java.io

Class InputStream

Implemented Interfaces:
Closeable
Known Direct Subclasses:
AudioInputStream, BlockingInputStream, ByteArrayInputStream, ByteIteratorInputStream, ChunkedInputStream, ClosedInputStream, ContentLengthInputStream, DemuxInputStream, DocumentInputStream, FileBufferedOutputStream.DataStream, FileInputStream, FileInputStreamProxy, FilterInputStream, InputStreamAdapter, MultipartStream.ItemInputStream, NullInputStream, ObjectInputStream, PipedInputStream, PngDecodingDataStream, PngInputStream, ReaderInputStream, RecordInputStream, SequenceInputStream, ServletInputStream, StringBufferInputStream, XMLEntityManager.RewindableInputStream

public abstract class InputStream
extends Object
implements Closeable

This abstract class is the superclass of all classes representing an input stream of bytes.

Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input.

Since:
JDK1.0
See Also:
BufferedInputStream, ByteArrayInputStream, DataInputStream, FilterInputStream, read(), OutputStream, PushbackInputStream

Method Summary

int
available()
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream.
void
close()
Closes this input stream and releases any system resources associated with the stream.
void
mark(int readlimit)
Marks the current position in this input stream.
boolean
markSupported()
Tests if this input stream supports the mark and reset methods.
abstract int
read()
Reads the next byte of data from the input stream.
int
read(b[] )
Reads some number of bytes from the input stream and stores them into the buffer array b.
int
read(b[] , int off, int len)
Reads up to len bytes of data from the input stream into an array of bytes.
void
reset()
Repositions this stream to the position at the time the mark method was last called on this input stream.
long
skip(long n)
Skips over and discards n bytes of data from this input stream.

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Details

available

public int available()
            throws IOException
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or another thread.

The available method for class InputStream always returns 0.

This method should be overridden by subclasses.

Returns:
the number of bytes that can be read from this input stream without blocking.
Throws:
IOException - if an I/O error occurs.
Usages and Demos :

View More Examples of available()
   1: 
   2: public class FilterInputStream extends InputStream {
   3:         ...
   4:     protected InputStream in;
   5:     
   6:         ...
   7:     protected FilterInputStream(InputStream in) {
   8:         this.in = in;
   9:         ...
  10:     public int available() throws IOException {
  11:         return in.available();

View Full Code Here
   1: package tuning.socket;
   2: import java.io.InputStream;
   3: import java.io.OutputStream;
   4:         ...
   5: 
   6: public class SockInStreamLogger extends InputStream
   7: {
   8:         ...
   9:   Socket s;
  10:   InputStream in;
  11:   byte[] one_byte = new byte[1];
  12:         ...
  13:   public SockInStreamLogger(Socket so, InputStream i){in = i; s = so;}
  14:   public int available() throws IOException {return in.available();}

View Full Code Here
   1: 
   2: public class ZipInputStream extends InputStream {
   3: 
   4:         ...
   5:     private InputStream in;
   6:     private ZipFile     zip;
   7:         ...
   8:     {
   9:     return in.available();
  10:     }
  11:         ...
  12: 
  13:     protected ZipInputStream(ZipFile zip, InputStream in) {

View Full Code Here
   1: 
   2: import java.io.InputStream;
   3: import java.io.IOException;
   4:         ...
   5: 
   6: public class CountInputStream extends InputStream {
   7:     long count = 0;
   8:         ...
   9: 
  10:     InputStream is;
  11: 
  12:         ...
  13:     {
  14:     return is.available();

View Full Code Here
   1:   
   2:   public FiniteInputStream(InputStream in) {
   3:     this(in, 8192); 
   4:         ...
   5: 
   6:   public FiniteInputStream(InputStream in, int limit) {
   7:     super(in);
   8:         ...
   9:     if (bytesRead >= limit) return 1;
  10:     else return in.available();
  11:   }

View Full Code Here

close

public void close()
            throws IOException
Closes this input stream and releases any system resources associated with the stream.

The close method of InputStream does nothing.

Specified by:
close in interface Closeable
Throws:
IOException - if an I/O error occurs.
Usages and Demos :

View More Examples of close()
   1: import java.io.IOException;
   2: import java.io.InputStream;
   3: import java.io.OutputStream;
   4:         ...
   5: public class Util {
   6:     public static void copyStream( InputStream in, OutputStream out, boolean closeOut ) throws IOException {
   7:         byte[] buf = new byte[256];
   8:         ...
   9:         }
  10:         in.close();
  11:         if(closeOut)
  12:         ...
  13:             out.close();

View Full Code Here
   1:     
   2:     InputStream  in  = socket.getInputStream();
   3:     OutputStream out = socket.getOutputStream();
   4:         ...
   5:     
   6:     in.close();
   7:         ...
   8:     out.close();
   9:   }

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.InputStream;
   3: import java.util.Properties;
   4:         ...
   5: public class PropertyStreamUtils {
   6:     public static Properties readProperties(InputStream in) {
   7:         Properties ret = new Properties();
   8:         ...
   9:             if (in != null)
  10:                 in.close();
  11:         } catch (IOException ioe) {

View Full Code Here
   1:     try{
   2:       InputStream in=PropertyReader.class.getResourceAsStream("db.conf");
   3:       ps.load(in);
   4:         ...
   5:       in.close();
   6:     }catch(Exception e){e.printStackTrace();}
   7:   }

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.InputStream;
   3: import java.util.Properties;
   4:         ...
   5:     public void load (String name) throws IOException {
   6:         InputStream in = getClass().getResourceAsStream(name);
   7:         Properties props = new Properties();
   8:         ...
   9:         props.load(in);
  10:         in.close();        
  11:         props.list(System.out);    

View Full Code Here

mark

public void mark(int readlimit)
Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.

The readlimit arguments tells this input stream to allow that many bytes to be read before the mark position gets invalidated.

The general contract of mark is that, if the method markSupported returns true, the stream somehow remembers all the bytes read after the call to mark and stands ready to supply those same bytes again if and whenever the method reset is called. However, the stream is not required to remember any data at all if more than readlimit bytes are read from the stream before reset is called.

The mark method of InputStream does nothing.

Parameters:
readlimit - the maximum limit of bytes that can be read before the mark position becomes invalid.
See Also:
reset()
Usages and Demos :

View More Examples of mark(int readlimit)
   1: class JigsawServletInputStream extends ServletInputStream {
   2:     InputStream in = null;
   3: 
   4:         ...
   5:     public synchronized void mark(int readlimit) {
   6:     in.mark(readlimit);
   7:     }
   8:         ...
   9:           got++;
  10:           in.mark(1);
  11:           if ((ch = in.read()) != '\n' )
  12:         ...
  13: 
  14:     JigsawServletInputStream(InputStream in) {

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.InputStream;
   3: 
   4:         ...
   5: 
   6:   public BERReader(InputStream in)
   7:   {
   8:         ...
   9:   {
  10:     in.mark(2);
  11:     int tag = in.read();
  12:         ...
  13:   {
  14:     in.mark(1);

View Full Code Here
   1: import java.io.ByteArrayOutputStream;
   2: import java.io.InputStream;
   3: 
   4:         ...
   5: 
   6:     private InputStream tee;
   7: 
   8:         ...
   9:     protected void setUp() throws Exception {
  10:         InputStream input = new ByteArrayInputStream("abc".getBytes(ASCII));
  11:         output = new ByteArrayOutputStream();
  12:         ...
  13:         assertEquals('a', tee.read());
  14:         tee.mark(1);

View Full Code Here
   1: import java.io.Reader;
   2: import java.io.InputStream;
   3: import java.io.IOException;
   4:         ...
   5:     public static Reader createUTFReader(
   6:         InputStream stream)
   7:     throws
   8:         ...
   9:         {
  10:             stream.mark(2);
  11:             b1 = stream.read();

View Full Code Here
   1: 
   2: import java.io.InputStream;
   3: import java.io.IOException;
   4:         ...
   5:       readerClassName,
   6:       new Class[]{ ImageInputStream.class, InputStream.class },
   7:       writerSpiNames,
   8:         ...
   9:     if( !(input instanceof ImageInputStream) && 
  10:     !(input instanceof InputStream)) 
  11:       return false;

View Full Code Here

markSupported

public boolean markSupported()
Tests if this input stream supports the mark and reset methods. Whether or not mark and reset are supported is an invariant property of a particular input stream instance. The markSupported method of InputStream returns false.
Returns:
true if this stream instance supports the mark and reset methods; false otherwise.
See Also:
mark(int), reset()
Usages and Demos :

View More Examples of markSupported()
   1: 
   2: public class FilterInputStream extends InputStream {
   3:         ...
   4:     protected InputStream in;
   5:     
   6:         ...
   7:     protected FilterInputStream(InputStream in) {
   8:         this.in = in;
   9:         ...
  10:     public boolean markSupported() {
  11:         return in.markSupported();

View Full Code Here
   1: package tuning.socket;
   2: import java.io.InputStream;
   3: import java.io.OutputStream;
   4:         ...
   5: 
   6: public class SockInStreamLogger extends InputStream
   7: {
   8:         ...
   9:   Socket s;
  10:   InputStream in;
  11:   byte[] one_byte = new byte[1];
  12:         ...
  13:   public void mark(int readlimit) {in.mark(readlimit);}
  14:   public boolean markSupported() {return in.markSupported();}

View Full Code Here
   1: 
   2: public class ZipInputStream extends InputStream {
   3: 
   4:         ...
   5:     private InputStream in;
   6:     private ZipFile     zip;
   7:         ...
   8:     public boolean markSupported() {
   9:     return in.markSupported();
  10:     }
  11:         ...
  12: 
  13:     protected ZipInputStream(ZipFile zip, InputStream in) {

View Full Code Here
   1: 
   2: import java.io.InputStream;
   3: import java.io.IOException;
   4:         ...
   5: 
   6: public class CountInputStream extends InputStream {
   7:     long count = 0;
   8:         ...
   9: 
  10:     InputStream is;
  11: 
  12:         ...
  13:     public boolean markSupported() {
  14:     return is.markSupported();

View Full Code Here
   1: class JigsawServletInputStream extends ServletInputStream {
   2:     InputStream in = null;
   3: 
   4:         ...
   5:     public boolean markSupported() {
   6:     return in.markSupported();
   7:     }
   8:         ...
   9: 
  10:     JigsawServletInputStream(InputStream in) {
  11:     this.in = in;

View Full Code Here

read

public abstract int read()
            throws IOException
Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.

A subclass must provide an implementation of this method.

Returns:
the next byte of data, or -1 if the end of the stream is reached.
Throws:
IOException - if an I/O error occurs.
Usages and Demos :

View More Examples of read()
   1: 
   2: abstract class CryptInputStream extends InputStream {
   3:         ...
   4:     InputStream in;
   5:     OutputStream out;
   6:         ...
   7:     abstract public void set( InputStream in, OutputStream out );
   8: 
   9:         ...
  10:     public int read(  ) throws IOException {
  11:         return in.read(  );

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.InputStream;
   3: 
   4:         ...
   5: 
   6:     private final InputStream input;
   7:     
   8:         ...
   9:     public InputStreamAnnotationScanner(final InputStream input) {
  10:         this.input = input;
  11:         ...
  12:     protected int getNext() throws IOException {
  13:         return input.read();

View Full Code Here
   1: 
   2: public class FilterInputStream extends InputStream {
   3:         ...
   4:     protected InputStream in;
   5:     
   6:         ...
   7:     protected FilterInputStream(InputStream in) {
   8:         this.in = in;
   9:         ...
  10:     public int read() throws IOException {
  11:         return in.read();

View Full Code Here
   1: 
   2: class ByteSwapInputStream extends InputStream
   3: {
   4:         ...
   5:     public ByteSwapInputStream( InputStream in )
   6:     {
   7:         ...
   8:         {
   9:             byte1 = in.read();
  10: 
  11:         ...
  12: 
  13:             return in.read();

View Full Code Here
   1:     private byte buffor[]=new byte[4];
   2:     private InputStream source=null;
   3:     
   4:         ...
   5:     public final int readUnsignedByte() throws IOException {
   6:     return source.read();
   7:     } 
   8:         ...
   9:     public final byte readByte() throws IOException {
  10:     return (byte)source.read();
  11:     }

View Full Code Here

read

public int read(b[] )
            throws IOException
Reads some number of bytes from the input stream and stores them into the buffer array b. The number of bytes actually read is returned as an integer. This method blocks until input data is available, end of file is detected, or an exception is thrown.

If b is null, a NullPointerException is thrown. If the length of b is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.

The first byte read is stored into element b[0], the next one into b[1], and so on. The number of bytes read is, at most, equal to the length of b. Let k be the number of bytes actually read; these bytes will be stored in elements b[0] through b[k-1], leaving elements b[k] through b[b.length-1] unaffected.

If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.

The read(b) method for class InputStream has the same effect as:

 read(b, 0, b.length) 
Parameters:
Returns:
the total number of bytes read into the buffer, or -1 is there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
NullPointerException - if b is null.
See Also:
java.io.InputStream.read(byte[], int, int)
Usages and Demos :

View More Examples of read(b[] )
   1: 
   2: public class FilterInputStream extends InputStream {
   3:         ...
   4:     protected InputStream in;
   5:     
   6:         ...
   7:     protected FilterInputStream(InputStream in) {
   8:         this.in = in;
   9:         ...
  10:     public int read(byte[] b) throws IOException {
  11:         return in.read(b);

View Full Code Here
   1: 
   2: public class ZipInputStream extends InputStream {
   3: 
   4:         ...
   5:     private InputStream in;
   6:     private ZipFile     zip;
   7:         ...
   8:     {
   9:     return in.read(b);
  10:     }
  11:         ...
  12: 
  13:     protected ZipInputStream(ZipFile zip, InputStream in) {

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.InputStream;
   3: 
   4:         ...
   5: 
   6: public class CloseCountDownInputStream extends InputStream
   7: {
   8:         ...
   9: 
  10:     private InputStream delegate;
  11:     private CountDownLatch latch;
  12:         ...
  13:     {
  14:         return delegate.read(b);

View Full Code Here
   1: 
   2: public abstract class DelayedInputStream extends InputStream
   3: {
   4:         ...
   5: 
   6:     protected InputStream in = null ;
   7: 
   8:         ...
   9:     if(in == null) init() ;
  10:     return in.read(b) ;
  11:     }

View Full Code Here
   1: {
   2:   private InputStream delegate_;
   3: 
   4:         ...
   5:   {
   6:     return delegate_.read(_b);
   7:   }
   8: 
   9:   public int read(byte[] _b, int _off, int _len)

View Full Code Here

read

public int read(b[] ,
                int off,
                int len)
            throws IOException
Reads up to len bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len bytes, but a smaller number may be read. The number of bytes actually read is returned as an integer.

This method blocks until input data is available, end of file is detected, or an exception is thrown.

If b is null, a NullPointerException is thrown.

If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.

If len is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.

The first byte read is stored into element b[off], the next one into b[off+1], and so on. The number of bytes read is, at most, equal to len. Let k be the number of bytes actually read; these bytes will be stored in elements b[off] through b[off+k-1], leaving elements b[off+k] through b[off+len-1] unaffected.

In every case, elements b[0] through b[off] and elements b[off+len] through b[b.length-1] are unaffected.

If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.

The read(b, off, len) method for class InputStream simply calls the method read() repeatedly. If the first such call results in an IOException, that exception is returned from the call to the read(b, off, len) method. If any subsequent call to read() results in a IOException, the exception is caught and treated as if it were end of file; the bytes read up to that point are stored into b and the number of bytes read before the exception occurred is returned. Subclasses are encouraged to provide a more efficient implementation of this method.

Parameters:
off - the start offset in array b at which the data is written.
len - the maximum number of bytes to read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached.
Throws:
IOException - if an I/O error occurs.
NullPointerException - if b is null.
See Also:
read()
Usages and Demos :

View More Examples of read(b[] ,int off,int len)
   1: 
   2: public class FilterInputStream extends InputStream {
   3:         ...
   4:     protected InputStream in;
   5:     
   6:         ...
   7:     protected FilterInputStream(InputStream in) {
   8:         this.in = in;
   9:         ...
  10:     public int read(byte[] b, int off, int len) throws IOException {
  11:         return in.read(b, off, len);

View Full Code Here
   1: 
   2: public class ZipInputStream extends InputStream {
   3: 
   4:         ...
   5:     private InputStream in;
   6:     private ZipFile     zip;
   7:         ...
   8:     {
   9:     return in.read(b,off,len);
  10:     }
  11:         ...
  12: 
  13:     protected ZipInputStream(ZipFile zip, InputStream in) {

View Full Code Here
   1: import java.io.IOException;
   2: import java.io.InputStream;
   3: 
   4:         ...
   5: 
   6: public class CloseCountDownInputStream extends InputStream
   7: {
   8:         ...
   9: 
  10:     private InputStream delegate;
  11:     private CountDownLatch latch;
  12:         ...
  13:     {
  14:         return delegate.read(b, off, len);

View Full Code Here
   1: 
   2: public class ServeInputStream extends InputStream
   3:     {
   4:         ...
   5: 
   6:     private InputStream in;
   7: 
   8:         ...
   9:     public ServeInputStream( InputStream in )
  10:     {
  11:         ...
  12:     {
  13:     return in.read( b, off, len );

View Full Code Here
   1: 
   2: public class ServeInputStream extends InputStream
   3:     {
   4:         ...
   5: 
   6:     private InputStream in;
   7: 
   8:         ...
   9:     public ServeInputStream( InputStream in )
  10:     {
  11:         ...
  12:     {
  13:     return in.read( b, off, len );

View Full Code Here

reset

public void reset()
            throws IOException
Repositions this stream to the position at the time the mark method was last called on this input stream.

The general contract of reset is:

  • If the method markSupported returns true, then:
    • If the method mark has not been called since the stream was created, or the number of bytes read from the stream since mark was last called is larger than the argument to mark at that last call, then an IOException might be thrown.
    • If such an IOException is not thrown, then the stream is reset to a state such that all the bytes read since the most recent call to mark (or since the start of the file, if mark has not been called) will be resupplied to subsequent callers of the read method, followed by any bytes that otherwise would have been the next input data as of the time of the call to reset.
  • If the method markSupported returns false, then:
    • The call to reset may throw an IOException.
    • If an IOException is not thrown, then the stream is reset to a fixed state that depends on the particular type of the input stream and how it was created. The bytes that will be supplied to subsequent callers of the read method depend on the particular type of the input stream.

    The method reset for class InputStream does nothing except throw an IOException.

  • Throws:
    IOException - if this stream has not been marked or if the mark has been invalidated.
    Usages and Demos :

    View More Examples of reset()
       1: 
       2: public class FilterInputStream extends InputStream {
       3:         ...
       4:     protected InputStream in;
       5:     
       6:         ...
       7:     protected FilterInputStream(InputStream in) {
       8:         this.in = in;
       9:         ...
      10:     public void reset() throws IOException {
      11:         in.reset();

    View Full Code Here
       1: 
       2: public class ZipInputStream extends InputStream {
       3: 
       4:         ...
       5:     private InputStream in;
       6:     private ZipFile     zip;
       7:         ...
       8:     {
       9:     in.reset();
      10:     }
      11:         ...
      12: 
      13:     protected ZipInputStream(ZipFile zip, InputStream in) {

    View Full Code Here
       1: 
       2: import java.io.InputStream;
       3: import java.io.IOException;
       4:         ...
       5: 
       6: public class CountInputStream extends InputStream {
       7:     long count = 0;
       8:         ...
       9: 
      10:     InputStream is;
      11: 
      12:         ...
      13:     {
      14:     is.reset();

    View Full Code Here
       1: class JigsawServletInputStream extends ServletInputStream {
       2:     InputStream in = null;
       3: 
       4:         ...
       5:     {
       6:     in.reset();
       7:     }
       8:         ...
       9:           if ((ch = in.read()) != '\n' )
      10:               in.reset();
      11:           return got;
      12:         ...
      13: 
      14:     JigsawServletInputStream(InputStream in) {

    View Full Code Here
       1: 
       2: public abstract class DelayedInputStream extends InputStream
       3: {
       4:         ...
       5: 
       6:     protected InputStream in = null ;
       7: 
       8:         ...
       9:     if(in == null) init() ;
      10:     in.reset() ;
      11:     }

    View Full Code Here

    skip

    public long skip(long n)
                throws IOException
    Skips over and discards n bytes of data from this input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. The actual number of bytes skipped is returned. If n is negative, no bytes are skipped.

    The skip method of InputStream creates a byte array and then repeatedly reads into it until n bytes have been read or the end of the stream has been reached. Subclasses are encouraged to provide a more efficient implementation of this method.

    Parameters:
    n - the number of bytes to be skipped.
    Returns:
    the actual number of bytes skipped.
    Throws:
    IOException - if an I/O error occurs.
    Usages and Demos :

    View More Examples of skip(long n)
       1: import java.io.IOException;
       2: import java.io.InputStream;
       3: import java.io.RandomAccessFile;
       4:         ...
       5: 
       6: public class ByteRangeOutputStream extends InputStream {
       7:     int              firstp = -1;
       8:         ...
       9:     int              lastp  = -1;
      10:     InputStream in = null;
      11: 
      12:         ...
      13:     this.in = in;
      14:     in.skip((long)firstp);

    View Full Code Here
       1:       try {
       2:     is.skip(length - 22 - 7);
       3: 
       4:         ...
       5:     if (is.read() != 0x50) {
       6:       is.skip(6);
       7: 
       8:         ...
       9:     if (_isValid) {
      10:       is.skip(6);
      11: 
      12:         ...
      13:   {
      14:     InputStream is = _is;

    View Full Code Here
       1: import java.io.IOException;
       2: import java.io.InputStream;
       3: import java.io.OutputStream;
       4:         ...
       5:     
       6:     public static void dumpMessage(int p_length, InputStream p_in)
       7:     {
       8:         ...
       9:         {
      10:             p_in.skip((long)p_length);
      11:         }catch(IOException e)

    View Full Code Here
       1: 
       2:   private final InputStream _is;
       3: 
       4:         ...
       5:   public ByteCodeClassScanner(String className,
       6:                   InputStream is,
       7:                   ByteCodeClassMatcher matcher)
       8:         ...
       9:     
      10:     _is.skip(2);
      11:     break;
      12:         ...
      13:     
      14:     _is.skip(4);

    View Full Code Here
       1: 
       2: import java.io.InputStream;
       3: import java.io.IOException;
       4:         ...
       5: {
       6:     protected InputStream  input;
       7:     protected StringBuffer sb;
       8:         ...
       9: 
      10:     public EmblCDROMIndexReader(InputStream input)
      11:         throws IOException
      12:         ...
      13: 
      14:         input.skip(256);

    View Full Code Here