The byte array input stream creates a byte array buffer in memory, and the data read from the input stream is saved in the byte array buffer. There are several ways to create a byte array input stream Object.
The receive byte array is created as a parameter:
New Bytearrayinputstream (byte [] a);
Another way to create this is to receive a byte array, and two shaping variables off, Len,off represents the first read byte, and Len represents the length of the read Byte.
New Bytearrayinputstream (byteintint len)
After you have successfully created the byte array input stream object, you can see the following methods for reading or other operations of the Convection.
⊙ public int read (): reads the next data byte from this input Stream.
⊙ public int read (byte[] r, int off, int len): reads the maximum number len
of data bytes from this input stream into a byte array.
⊙ public int available (): Returns the number of bytes read from this input stream without blocking.
⊙ public void Mark (int read): sets the current marker position in the Stream.
⊙ public Long Skip (long n): skips n
an input byte from this input Stream.
Cheer Up--not to Be continued
Java stream (stream), file, and Io-java Bytearrayinputstream class