| java.lang.Object net.sourceforge.squirrel_sql.fw.datasetviewer.cellcomponent.BinaryDisplayConverter
BinaryDisplayConverter | public class BinaryDisplayConverter (Code) | | author: gwg author: This encapsulates the functions of converting binary data author: (held as an array of Bytes) author: into a string for display, and converting a string from a display author: into an array of Bytes. author: Both operations allow for the string to be "". author: Both operations allow for hex, octal, decimal or binary representation. author: Both operations allow for individual bytes that represent ascii characters author: to be displayed as that ascii char rather than as the binary representation. author: author: These functions are entirely static since all parameters are handed in author: each time they are called, so there is no need for any instances of this author: class to ever be created.
|
Inner Class :static class ConversionConstants | |
Field Summary | |
final public static int | BINARY Use Binary representation. | final public static int | DECIMAL Use decimal representation. | final public static int | HEX | final public static int | OCTAL Use Octal representation. | static ConversionConstants | decimal | static ConversionConstants | hex |
BINARY | final public static int BINARY(Code) | | Use Binary representation.
|
DECIMAL | final public static int DECIMAL(Code) | | Use decimal representation.
|
HEX | final public static int HEX(Code) | | Use Hexidecimal representation
|
OCTAL | final public static int OCTAL(Code) | | Use Octal representation.
|
decimal | static ConversionConstants decimal(Code) | | |
hex | static ConversionConstants hex(Code) | | |
convertToBytes | public static Byte[] convertToBytes(String data, int base, boolean showAscii) throws NumberFormatException(Code) | | Convert a string into Bytes. The string is assumed to be in
the form generated by the convertToString function, with each
byte's data space separated from each other byte's.
|
convertToString | public static String convertToString(Byte[] data, int base, boolean showAscii)(Code) | | Convert from an array of Bytes into a string.
|
|
|