public class LoggedDataInputStream extends FilterInputStream
in| Constructor and Description |
|---|
LoggedDataInputStream(InputStream in)
Construct a logged stream using the specified underlying stream
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this input stream and releases any system resources associated
with the stream.
|
long |
getCounter() |
InputStream |
getUnderlyingStream() |
int |
read()
Interruptible read.
|
int |
read(byte[] b)
Reads up to byte.length bytes of data from this input stream into an
array of bytes.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from this input stream into an array of
bytes
|
byte[] |
readBytes(int len)
Synchronously reads fixed chunk from the stream, logging it too.
|
String |
readLine()
Deprecated.
It converts input data to string using
ByteArray.getStringFromBytes() that works only for
ASCII without 0. Use byte access methods
instead. |
ByteArray |
readLineBytes() |
void |
setUnderlyingStream(InputStream is) |
long |
skip(long n) |
available, mark, markSupported, resetpublic LoggedDataInputStream(InputStream in)
in - the stream@Deprecated public String readLine() throws IOException
ByteArray.getStringFromBytes() that works only for
ASCII without 0. Use byte access methods
instead.IOExceptionpublic ByteArray readLineBytes() throws IOException
IOExceptionEOFException - at stream endpublic byte[] readBytes(int len)
throws IOException
len - blocks until specifid number of bytes is read.IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamInterruptedIOException - on thread interruptIOExceptionpublic InputStream getUnderlyingStream()
public void setUnderlyingStream(InputStream is)
public long getCounter()
Copyright © 2013. All rights reserved.