ByteArrayInputStream


ByteArrayInputStream java.io

Java 1.0 closeable

This class is a subclass of InputStream in which input data comes from a specified array of byte values. This is useful when you want to read data in memory as if it were coming from a file, pipe, or socket. Note that the specified array of bytes is not copied when a ByteArrayInputStream is created. See also CharArrayReader .

Figure 9-5. java.io.ByteArrayInputStream

 public class  ByteArrayInputStream  extends InputStream {  // Public Constructors  public  ByteArrayInputStream  (byte[ ]  buf  );        public  ByteArrayInputStream  (byte[ ]  buf  , int  offset  , int  length  );  // Public Methods Overriding InputStream  public int  available  ( );  synchronized   1.2  public void  close  ( ) throws IOException;  empty   1.1  public void  mark  (int  readAheadLimit  );  1.1  public boolean  markSupported  ( );  constant  public int  read  ( );  synchronized  public int  read  (byte[ ]  b  , int  off  , int  len  );  synchronized  public void  reset  ( );  synchronized  public long  skip  (long  n  );  synchronized   // Protected Instance Fields  protected byte[ ]  buf  ;        protected int  count  ;  1.1  protected int  mark  ;        protected int  pos  ;   } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net