public class BitEncoderChannel extends AbstractEncoderChannel implements EncoderChannel
| Modifier and Type | Field and Description |
|---|---|
protected BitOutputStream |
ostream
Underlying bit output stream to which bits and bytes are written.
|
| Constructor and Description |
|---|
BitEncoderChannel(OutputStream ostream)
Construct an encoder from output stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
align()
Align to next byte-aligned boundary in the stream if it is not already at
such a boundary
|
void |
encode(byte[] b,
int off,
int len) |
void |
encode(int b) |
void |
encodeBoolean(boolean b)
Encode a single boolean value.
|
void |
encodeNBitUnsignedInteger(int b,
int n)
Encode n-bit unsigned integer.
|
void |
flush()
Flush underlying bit output stream.
|
int |
getLength()
Returns the number of bytes written.
|
OutputStream |
getOutputStream() |
encodeBigInteger, encodeBinary, encodeDateTime, encodeDecimal, encodeFloat, encodeInteger, encodeIntegerValue, encodeLong, encodeString, encodeStringOnly, encodeUnsignedBigInteger, encodeUnsignedInteger, encodeUnsignedIntegerValue, encodeUnsignedLongclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitencodeBinary, encodeDateTime, encodeDecimal, encodeFloat, encodeInteger, encodeIntegerValue, encodeString, encodeStringOnly, encodeUnsignedInteger, encodeUnsignedIntegerValueprotected BitOutputStream ostream
public BitEncoderChannel(OutputStream ostream)
ostream - output streampublic OutputStream getOutputStream()
getOutputStream in interface EncoderChannelpublic int getLength()
EncoderChannelgetLength in interface EncoderChannelpublic void flush()
throws IOException
flush in interface EncoderChannelIOExceptionpublic void align()
throws IOException
EncoderChannelalign in interface EncoderChannelIOException - IO exceptionpublic void encode(int b)
throws IOException
encode in interface EncoderChannelIOExceptionpublic void encode(byte[] b,
int off,
int len)
throws IOException
encode in interface EncoderChannelIOExceptionpublic void encodeNBitUnsignedInteger(int b,
int n)
throws IOException
encodeNBitUnsignedInteger in interface EncoderChannelIOExceptionpublic void encodeBoolean(boolean b)
throws IOException
encodeBoolean in interface EncoderChannelb - booleanIOException - IO exceptionCopyright © 2018 Siemens AG. All rights reserved.