public class SixbitEncoder extends Object
| Constructor and Description |
|---|
SixbitEncoder() |
| Modifier and Type | Method and Description |
|---|---|
void |
addString(String str)
Add string
|
void |
addString(String str,
int length)
Add string and a number of spaces to fill length characters
|
void |
addVal(long value,
int bits)
Add a value using bits number of bits
|
void |
append(BinArray ba)
Append a binary array
|
void |
append(SixbitEncoder encoder)
Append another encoder
|
String |
encode()
Get encoded six bit string
|
BinArray |
getBinArray()
Get the underlying binary array
|
int |
getLength()
Get bit length
|
int |
getPadBits()
The number of padding bits
|
String |
toString() |
public void addVal(long value,
int bits)
value - the valuebits - the bitspublic void addString(String str)
str - the strpublic void addString(String str, int length)
str - the strlength - the lengthpublic void append(SixbitEncoder encoder)
encoder - the encoderpublic void append(BinArray ba)
ba - the bapublic String encode() throws SixbitException
SixbitException - the sixbit exceptionpublic int getPadBits()
public int getLength()
public BinArray getBinArray()
Copyright © 2011–2019 Danish Maritime Authority. All rights reserved.