Closeable
, AutoCloseable
public class InverseInputStream extends InputStream
InverseInputStream
wraps an InputStream
and consumes input
bytes by applying a InverseFunction
on each byte read from the
provided InputStream
before passing back the processed byte to the
caller. The input of the InverseInputStream
can be converted back by
the according BijectiveOutputStream
.Constructor | Description |
---|---|
InverseInputStream(InputStream aInputStream,
org.refcodes.numerical.InverseFunction<Byte,Byte> aInverseFunction) |
Constructs the
InverseInputStream by wrapping the given
InputStream for the provided InverseFunction to be
applied on the bytes to be read. |
Modifier and Type | Method | Description |
---|---|---|
int |
available() |
|
void |
close() |
|
boolean |
equals(Object aObj) |
|
int |
hashCode() |
|
void |
mark(int aReadlimit) |
|
boolean |
markSupported() |
|
int |
read() |
|
void |
reset() |
|
long |
skip(long aArg0) |
|
String |
toString() |
read, read, readAllBytes, readNBytes, transferTo
public InverseInputStream(InputStream aInputStream, org.refcodes.numerical.InverseFunction<Byte,Byte> aInverseFunction)
InverseInputStream
by wrapping the given
InputStream
for the provided InverseFunction
to be
applied on the bytes to be read.aInputStream
- The InputStream
to be wrapped.aInverseFunction
- The InverseFunction
to be applied to the
bytes to be read.public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class InputStream
IOException
public void mark(int aReadlimit)
mark
in class InputStream
public boolean markSupported()
markSupported
in class InputStream
public int read() throws IOException
read
in class InputStream
IOException
public void reset() throws IOException
reset
in class InputStream
IOException
public long skip(long aArg0) throws IOException
skip
in class InputStream
IOException
Copyright © 2021. All rights reserved.