|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sam.io.ByteArrayFilter
Abstract class for filtering byte[]
arrays
Nested Class Summary | |
class |
ByteArrayFilter.InputStream
Instance inner-class for filtering an InputStream with outer-instance's filter,
as in:
|
class |
ByteArrayFilter.OutputStream
Instance inner-class for filtering an OutputStream with outer-instance's filter,
as in:
|
Field Summary | |
protected int |
length
Length of a block size |
Constructor Summary | |
protected |
ByteArrayFilter(int length)
|
Method Summary | |
protected void |
fillRandomly(byte[] data,
int start,
int end)
Called whenever the whole buffer can not be filled up with fresh data. |
void |
filter(byte[] data)
|
protected abstract void |
filter(byte[] data,
int offset)
Filters the data byte[] array
from position offset up to offset + length - 1 . |
void |
filter(byte[] data,
int begin,
int end)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final int length
Constructor Detail |
protected ByteArrayFilter(int length)
Method Detail |
protected abstract void filter(byte[] data, int offset)
data
byte[]
array
from position offset
up to offset + length - 1
.
public void filter(byte[] data)
public void filter(byte[] data, int begin, int end)
protected void fillRandomly(byte[] data, int start, int end)
To be overriden as required.
This implementation fills up remaining bytes with random data.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |