Class FramedMessageInputStream

    • Constructor Detail

      • FramedMessageInputStream

        public FramedMessageInputStream()
      • FramedMessageInputStream

        public FramedMessageInputStream​(int frameSize)
    • Method Detail

      • setSocketChannel

        public void setSocketChannel​(SocketChannel socketChannel)
      • getChannelId

        public int getChannelId()
      • getMessageId

        public int getMessageId()
      • getContentId

        public int getContentId()
      • isDirectMode

        public boolean isDirectMode()
      • setDirectMode

        public void setDirectMode​(boolean isDirectMode)
      • setFrameSize

        public void setFrameSize​(int frameSize)
      • setByteBuffer

        public void setByteBuffer​(ByteBuffer byteBuffer)
      • available

        public int available()
        Return the available bytes
        Overrides:
        available in class InputStream
        Returns:
        the wrapped byteBuffer.remaining()
      • markSupported

        public boolean markSupported()
        Return true if mark is supported.
        Overrides:
        markSupported in class InputStream
      • read

        public int read()
        Read the first byte from the wrapped ByteBuffer.
        Specified by:
        read in class InputStream
      • read

        public int read​(byte[] b)
        Read the bytes from the wrapped ByteBuffer.
        Overrides:
        read in class InputStream
      • read

        public int read​(byte[] b,
                        int offset,
                        int length)
        Read the first byte of the wrapped ByteBuffer.
        Overrides:
        read in class InputStream
      • isMessageInProcess

        public boolean isMessageInProcess()