|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
org.ws4d.java.io.buffered.BufferedInputStream
public class BufferedInputStream
This class allows the enabling of mark support on an input stream. It is possible to read some bytes from the stream without exhausting it.
Constructor Summary | |
---|---|
BufferedInputStream(java.io.InputStream in)
This class allows the enabling of mark support on an input stream. |
|
BufferedInputStream(java.io.InputStream in,
int maxsize)
This class allows the enabling of mark support on an input stream. |
|
BufferedInputStream(java.io.InputStream in,
int size,
int maxsize)
This class allows the enabling of mark support on an input stream. |
Method Summary | |
---|---|
int |
available()
|
void |
close()
|
boolean |
equals(java.lang.Object obj)
|
int |
hashCode()
|
boolean |
isMarked()
Returns true if the stream has a mark set,
false otherwise. |
boolean |
isMarkWatched()
Is mark watched? |
boolean |
isTimeoutMode()
Is timeout mode enabled? |
void |
mark(int readAheadLimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int length)
|
void |
reset()
|
void |
setMarkWatchMode(boolean mode)
Allows the stream to throw a MarkReachedException. |
void |
setTimeoutMode(boolean mode)
Set the timeout mode. |
java.lang.String |
toString()
|
Methods inherited from class java.io.InputStream |
---|
skip |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BufferedInputStream(java.io.InputStream in)
in
- input stream without mark support.public BufferedInputStream(java.io.InputStream in, int maxsize)
in
- input stream without mark support.maxsize
- do not read more bytes.public BufferedInputStream(java.io.InputStream in, int size, int maxsize)
in
- input stream without mark support.size
- buffer size.maxsize
- do not read more bytes.Method Detail |
---|
public int read() throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b, int off, int length) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.InputStream
java.io.IOException
public void reset() throws java.io.IOException
reset
in class java.io.InputStream
java.io.IOException
public boolean markSupported()
markSupported
in class java.io.InputStream
public int available() throws java.io.IOException
available
in class java.io.InputStream
java.io.IOException
public void mark(int readAheadLimit)
mark
in class java.io.InputStream
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
public boolean isMarked()
true
if the stream has a mark set,
false
otherwise.
true
if the stream has a mark set,
false
otherwise.public void setMarkWatchMode(boolean mode)
mode
- true
to allow exception.public boolean isMarkWatched()
true
if mark is watched, false
otherwise.public boolean isTimeoutMode()
true
if this stream is in timeout mode,
false
otherwise.public void setTimeoutMode(boolean mode)
mode
- true
enables timeout mode, false
disables it.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |