public class BitBuilder
extends java.lang.Object
| Constructor and Description |
|---|
BitBuilder() |
| Modifier and Type | Method and Description |
|---|---|
void |
pad()
Advance to the next octet boundary without writing; the skipped bits are already zero.
|
int |
write(java.io.OutputStream outputStream)
Deprecated.
the builder is left holding the octets it has just written, including a final octet
that further bits would go on filling, so a second write re-emits them; use
writeAndClear(OutputStream), which writes the same octets and resets the builder. |
void |
write7BitBytes(java.math.BigInteger value)
As
write7BitBytes(int), for a non-negative value of any size. |
void |
write7BitBytes(int value)
Write
value as the subsequent octets of a CHOICE tag, X.696 sec. 8.7.2.3: seven bits
per octet, most significant group first, in the fewest octets that hold the value (so the
first group is never all zero), with bit 8 set on every octet but the last. |
int |
writeAndClear(java.io.OutputStream outputStream) |
BitBuilder |
writeBit(int bit)
write a bit
|
BitBuilder |
writeBits(long value,
int start) |
BitBuilder |
writeBits(long value,
int start,
int len) |
void |
zero() |
public BitBuilder writeBit(int bit)
bit - where 0 = 0 bit and not zero is 1 bit.public BitBuilder writeBits(long value, int start)
public BitBuilder writeBits(long value, int start, int len)
public int write(java.io.OutputStream outputStream)
throws java.io.IOException
writeAndClear(OutputStream), which writes the same octets and resets the builder.java.io.IOExceptionpublic int writeAndClear(java.io.OutputStream outputStream)
throws java.io.IOException
java.io.IOExceptionpublic void pad()
public void write7BitBytes(int value)
value as the subsequent octets of a CHOICE tag, X.696 sec. 8.7.2.3: seven bits
per octet, most significant group first, in the fewest octets that hold the value (so the
first group is never all zero), with bit 8 set on every octet but the last. A negative
argument is taken as its unsigned 32-bit value.public void write7BitBytes(java.math.BigInteger value)
write7BitBytes(int), for a non-negative value of any size.public void zero()