JavaScript is disabled on your browser.
gnu.inet.util

Class MessageInputStream

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable


    public class MessageInputStream
    extends java.io.FilterInputStream
    A utility class for feeding message contents to messages. This stream returns -1 from read when the stream termination sequence LF,END,LF is read from the underlying stream.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      protected int buf1
      protected int buf2
      static int END
      The stream termination octet ('.').
      protected boolean eof
      static int LF
      The line termination octet ('\n').
      protected int markBuf1
      protected int markBuf2
      • Fields inherited from class java.io.FilterInputStream

        in
    • Constructor Summary

      Constructors
      Constructor and Description
      MessageInputStream (java.io.InputStream in)
      Constructs a message input stream connected to the specified input stream.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      void mark (int readlimit)
      boolean markSupported ()
      int read ()
      Reads the next byte of data from this message input stream.
      int read (byte[] b)
      Reads up to b.length bytes of data from this input stream into an array of bytes.
      int read (byte[] b, int off, int len)
      Reads up to len bytes of data from this input stream into an array of bytes, starting at the specified offset.
      void reset ()
      • Methods inherited from class java.io.FilterInputStream

        available, close, skip
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • eof

        protected boolean eof
      • buf1

        protected int buf1
      • buf2

        protected int buf2
      • markBuf1

        protected int markBuf1
      • markBuf2

        protected int markBuf2
    • Constructor Detail

      • MessageInputStream

        public MessageInputStream(java.io.InputStream in)
        Constructs a message input stream connected to the specified input stream.
    • Method Detail

      • read

        public int read()
         throws java.io.IOException
        Reads the next byte of data from this message input stream. Returns -1 if the end of the message stream has been reached.
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException - if an I/O error occurs
      • read

        public int read(byte[] b)
         throws java.io.IOException
        Reads up to b.length bytes of data from this input stream into an array of bytes. Returns -1 if the end of the stream has been reached.
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException - if an I/O error occurs
      • read

        public int read(byte[] b,
         int off,
         int len)
         throws java.io.IOException
        Reads up to len bytes of data from this input stream into an array of bytes, starting at the specified offset. Returns -1 if the end of the stream has been reached.
        Overrides:
        read in class java.io.FilterInputStream
        Throws:
        java.io.IOException - if an I/O error occurs
      • markSupported

        public boolean markSupported()
        Overrides:
        markSupported in class java.io.FilterInputStream
      • mark

        public void mark(int readlimit)
        Overrides:
        mark in class java.io.FilterInputStream
      • reset

        public void reset()
         throws java.io.IOException
        Overrides:
        reset in class java.io.FilterInputStream
        Throws:
        java.io.IOException

AltStyle によって変換されたページ (->オリジナル) /