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, toStringpublic PrependableSocket(SocketImpl base) throws IOException
IOExceptionpublic InputStream getInputStream() throws IOException
getInputStream in class SocketIOExceptionpublic 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–2021 The Apache Software Foundation. All rights reserved.