Summary
Public Methods |
int
|
available()
Returns the number of bytes that are available before this stream will
block.
|
void
|
close()
Closes this stream.
|
int
|
read(byte[] b, int off, int len)
Reads at most length bytes from this stream and stores them in
the byte array b starting at offset .
|
int
|
read()
Reads a single byte from this stream and returns it as an integer in the
range from 0 to 255.
|
[Expand]
Inherited Methods |
From class java.io.InputStream
|
From class java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals(Object o)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Is called before the object's memory is being reclaimed by the VM.
|
final
Class<? extends Object>
|
getClass()
Returns the unique instance of Class which represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long millis, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long millis)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
|
From interface java.io.Closeable
abstract
void
|
close()
Closes the object and release any system resources it holds.
|
|
Public Constructors
Public Methods
public
int
available
()
Returns the number of bytes that are available before this stream will
block. This implementation always returns 0. Subclasses should override
and indicate the correct number of bytes available.
Returns
- the number of bytes available before blocking.
public
void
close
()
Closes this stream. Concrete implementations of this class should free
any resources during close. This implementation does nothing.
public
int
read
(byte[] b, int off, int len)
Reads at most length
bytes from this stream and stores them in
the byte array b
starting at offset
.
Parameters
b
| the byte array in which to store the bytes read. |
off
| the initial position in buffer to store the bytes read
from this stream. |
len
| the maximum number of bytes to store in b . |
Returns
- the number of bytes actually read or -1 if the end of the stream
has been reached.
public
int
read
()
Reads a single byte from this stream and returns it as an integer in the
range from 0 to 255. Returns -1 if the end of the stream has been
reached. Blocks until one byte has been read, the end of the source
stream is detected or an exception is thrown.
Returns
- the byte read or -1 if the end of stream has been reached.