Package util
Class StreamReader
- java.lang.Object
-
- util.StreamReader
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Direct Known Subclasses:
SlimStreamReader
public class StreamReader extends java.lang.Object implements java.io.Closeable
-
-
Constructor Summary
Constructors Constructor Description StreamReader(java.io.InputStream input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
byteCount()
void
close()
void
copyBytes(int count, java.io.OutputStream output)
void
copyBytesUpTo(java.lang.String boundary, java.io.OutputStream outputStream)
byte[]
getBufferedBytes()
boolean
isEof()
boolean
isTimeout()
long
numberOfBytesConsumed()
java.lang.String
read(int count)
byte[]
readBytes(int count)
byte[]
readBytesUpTo(java.lang.String boundary)
java.lang.String
readLine()
byte[]
readLineBytes()
java.lang.String
readUpTo(java.lang.String boundary)
void
resetNumberOfBytesConsumed()
void
setTimeoutLimit(int timeout)
int
timeoutLimit()
-
-
-
Method Detail
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Throws:
java.io.IOException
-
setTimeoutLimit
public void setTimeoutLimit(int timeout)
-
timeoutLimit
public int timeoutLimit()
-
isTimeout
public boolean isTimeout()
-
readLine
public java.lang.String readLine() throws java.io.IOException
- Throws:
java.io.IOException
-
readLineBytes
public byte[] readLineBytes() throws java.io.IOException
- Throws:
java.io.IOException
-
read
public java.lang.String read(int count) throws java.io.IOException
- Throws:
java.io.IOException
-
readBytes
public byte[] readBytes(int count) throws java.io.IOException
- Throws:
java.io.IOException
-
copyBytes
public void copyBytes(int count, java.io.OutputStream output) throws java.io.IOException
- Throws:
java.io.IOException
-
readUpTo
public java.lang.String readUpTo(java.lang.String boundary) throws java.io.IOException
- Throws:
java.io.IOException
-
readBytesUpTo
public byte[] readBytesUpTo(java.lang.String boundary) throws java.io.IOException
- Throws:
java.io.IOException
-
copyBytesUpTo
public void copyBytesUpTo(java.lang.String boundary, java.io.OutputStream outputStream) throws java.io.IOException
- Throws:
java.io.IOException
-
byteCount
public int byteCount()
-
getBufferedBytes
public byte[] getBufferedBytes()
-
isEof
public boolean isEof()
-
numberOfBytesConsumed
public long numberOfBytesConsumed()
-
resetNumberOfBytesConsumed
public void resetNumberOfBytesConsumed()
-
-