DCT Lightfoot v3 API specification

java.io
Class InputStream

java.lang.Object
  |
  +--java.io.InputStream
All Implemented Interfaces:
Readable
Direct Known Subclasses:
ByteArrayInputStream, FlashFileInputStream, SocketInputStream

public abstract class InputStream
extends Object
implements Readable

This is the superclass of all input streams


Constructor Summary
InputStream()
          Create a new input stream
 
Method Summary
 int available()
          return the number of available bytes in this stream
 void close()
          Close the stream
 void mark(int readlimit)
          Mark the current point in the stream
 boolean markSupported()
          Test if the stream supports marks
abstract  int read()
          read a byte
 int read(byte[] b)
          read a number of bytes from the input stream and store into the byte array
 int read(byte[] b, int off, int len)
          read a number of bytes from the input stream and store into the byte array
 void reset()
          Reset the stream to where the mark was set
 long skip(long n)
          skip a number of bytes from the stream
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InputStream

public InputStream()
Create a new input stream

Method Detail

available

public int available()
              throws IOException
return the number of available bytes in this stream

Returns:
number of bytes
Throws:
IOException - if there is an IO error

close

public void close()
           throws IOException
Close the stream

Throws:
IOException - if there is an IO error

mark

public void mark(int readlimit)
Mark the current point in the stream

Parameters:
readlimit - the number of bytes to read before invalidating the mark

markSupported

public boolean markSupported()
Test if the stream supports marks

Returns:
true if it does

read

public abstract int read()
                  throws IOException
read a byte

Specified by:
read in interface Readable
Returns:
the byte read
Throws:
IOException - if there is an IO error

read

public int read(byte[] b)
         throws IOException
read a number of bytes from the input stream and store into the byte array

Parameters:
b - The array to write into
Returns:
the number of bytes read
Throws:
IOException - if there is an IO error

read

public int read(byte[] b,
                int off,
                int len)
         throws IOException
read a number of bytes from the input stream and store into the byte array

Specified by:
read in interface Readable
Parameters:
b - The array to write into
off - The offset to start writing to
len - The maximum number of bytes to read
Returns:
the number of bytes read
Throws:
IOException - if there is an IO error

reset

public void reset()
           throws IOException
Reset the stream to where the mark was set

Throws:
IOException - if there is an IO error

skip

public long skip(long n)
          throws IOException
skip a number of bytes from the stream

Specified by:
skip in interface Readable
Parameters:
n - The number to skip
Throws:
IOException - if there is an IOError

DCT Lightfoot v3 API specification

DCT Lightfoot v3 API specification