Package com.sun.xml.ws.transport.tcp.io
Class FramedMessageInputStream
java.lang.Object
java.io.InputStream
com.sun.xml.ws.transport.tcp.io.FramedMessageInputStream
- All Implemented Interfaces:
LifeCycle,Closeable,AutoCloseable
Stream wrapper around a
ByteBuffer-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate()intReturn the available bytesvoidclose()Close this stream.voidintintintbooleanbooleanbooleanReturn true if mark is supported.voidintread()Read the first byte from the wrappedByteBuffer.intread(byte[] b) Read the bytes from the wrappedByteBuffer.intread(byte[] b, int offset, int length) Read the first byte of the wrappedByteBuffer.voidreset()voidsetByteBuffer(ByteBuffer byteBuffer) voidsetDirectMode(boolean isDirectMode) voidsetFrameSize(int frameSize) voidsetSocketChannel(SocketChannel socketChannel) voidtoString()Methods inherited from class java.io.InputStream
mark, nullInputStream, readAllBytes, readNBytes, readNBytes, skip, transferTo
-
Constructor Details
-
FramedMessageInputStream
public FramedMessageInputStream() -
FramedMessageInputStream
public FramedMessageInputStream(int frameSize)
-
-
Method Details
-
setSocketChannel
-
getChannelId
public int getChannelId() -
getMessageId
public int getMessageId() -
getContentId
public int getContentId() -
getContentProperties
-
isDirectMode
public boolean isDirectMode() -
setDirectMode
public void setDirectMode(boolean isDirectMode) -
setFrameSize
public void setFrameSize(int frameSize) -
setByteBuffer
-
available
public int available()Return the available bytes- Overrides:
availablein classInputStream- Returns:
- the wrapped byteBuffer.remaining()
-
close
public void close()Close this stream.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream
-
markSupported
public boolean markSupported()Return true if mark is supported.- Overrides:
markSupportedin classInputStream
-
read
public int read()Read the first byte from the wrappedByteBuffer.- Specified by:
readin classInputStream
-
read
public int read(byte[] b) Read the bytes from the wrappedByteBuffer.- Overrides:
readin classInputStream
-
read
public int read(byte[] b, int offset, int length) Read the first byte of the wrappedByteBuffer.- Overrides:
readin classInputStream
-
forceHeaderRead
- Throws:
IOException
-
skipToEndOfMessage
- Throws:
EOFException
-
isMessageInProcess
public boolean isMessageInProcess() -
reset
public void reset()- Overrides:
resetin classInputStream
-
activate
public void activate() -
passivate
public void passivate() -
toString
-