public class NOnesIntDecoder extends FourFlagsIntDecoder
NOnesIntEncoder. Uses a
FourFlagsIntDecoder to perform the actual encoding and translates the
values back as described in NOnesIntEncoder.NOnesIntEncoderEOS, in| Constructor and Description |
|---|
NOnesIntDecoder(int n)
Constructs a decoder with a given N (Number of consecutive '1's which are
translated into a single target value '2'.
|
| Modifier and Type | Method and Description |
|---|---|
long |
decode()
Decodes data received from the input stream, and returns one decoded
integer.
|
void |
reInit(InputStream in)
Sets the input stream from which the encoded data is read.
|
String |
toString() |
public NOnesIntDecoder(int n)
public long decode()
throws IOException
IntDecoderIntDecoder.EOS is returned.decode in class FourFlagsIntDecoderIntDecoder.EOS if end-of-stream
reached.IOException - if an I/O error occurspublic void reInit(InputStream in)
IntDecoderreInit in class FourFlagsIntDecoderpublic String toString()
toString in class FourFlagsIntDecoderCopyright © 2000-2012 Apache Software Foundation. All Rights Reserved.