public class PrependableSocket extends Socket
Constructor and Description |
---|
PrependableSocket(SocketImpl base) |
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream() |
void |
prependToInputStream(byte[] bytes,
int offset,
int length)
Prepend some bytes that have already been read back to the socket's input stream.
|
bind, close, connect, connect, getChannel, getInetAddress, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getOutputStream, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isClosed, isConnected, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, shutdownInput, shutdownOutput, toString
public PrependableSocket(SocketImpl base) throws IOException
IOException
public InputStream getInputStream() throws IOException
getInputStream
in class Socket
IOException
public void prependToInputStream(byte[] bytes, int offset, int length) throws IOException
bytes
- the bytes to prepend.offset
- offset in the byte array to start at.length
- number of bytes to prepend.IOException
- if this method was already called on the socket instance, or if super.getInputStream() throws.Copyright © 2008–2020 The Apache Software Foundation. All rights reserved.