|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream
An abstract class representing an input stream of bytes. All InputStreams are based on this class.
OutputStream
,
FilterInputStream
,
BufferedInputStream
,
DataInputStream
,
ByteArrayInputStream
,
PushbackInputStream
Constructor Summary | |
InputStream()
|
Method Summary | |
int |
available()
Returns the number of bytes that can be read without blocking. |
void |
close()
Closes the input stream. |
void |
mark(int readlimit)
Marks the current position in the input stream. |
boolean |
markSupported()
Returns a boolean indicating whether or not this stream type supports mark/reset. |
abstract int |
read()
Reads a byte of data. |
int |
read(byte[] b)
Reads into an array of bytes. |
int |
read(byte[] b,
int off,
int len)
Reads into an array of bytes. |
void |
reset()
Repositions the stream to the last marked position. |
long |
skip(long n)
Skips n bytes of input. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InputStream()
Method Detail |
public abstract int read() throws IOException
IOException
- If an I/O error has occurred.public int read(byte[] b) throws IOException
b
- the buffer into which the data is read
IOException
- If an I/O error has occurred.public int read(byte[] b, int off, int len) throws IOException
b
- the buffer into which the data is readoff
- the start offset of the datalen
- the maximum number of bytes read
IOException
- If an I/O error has occurred.public long skip(long n) throws IOException
n
- the number of bytes to be skipped
IOException
- If an I/O error has occurred.public int available() throws IOException
IOException
public void close() throws IOException
IOException
- If an I/O error has occurred.public void mark(int readlimit)
readlimit
- the maximum limit of bytes allowed to be read
before the mark position becomes invalid.public void reset() throws IOException
IOException
- If the stream has not been marked or
if the mark has been invalidated.public boolean markSupported()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |