public class PCLByteWriterUtil
extends java.lang.Object
Constructor and Description |
---|
PCLByteWriterUtil() |
Modifier and Type | Method and Description |
---|---|
byte[] |
insertIntoArray(int index,
byte[] insertTo,
byte[] data) |
int |
log(int x,
int base) |
int |
maxPower2(int value) |
byte[] |
padBytes(byte[] in,
int length) |
byte[] |
padBytes(byte[] in,
int length,
int value) |
byte |
signedByte(int s) |
byte[] |
signedInt(int s) |
byte[] |
toByteArray(int[] s) |
int |
unsignedByte(int b) |
byte[] |
unsignedInt(int s) |
byte[] |
unsignedLongInt(int s) |
byte[] |
unsignedLongInt(long s) |
byte[] |
updateDataAtLocation(byte[] data,
byte[] update,
int offset) |
byte[] |
writeCommand(java.lang.String cmd)
Writes a PCL escape command to the output stream.
|
public byte[] padBytes(byte[] in, int length)
public byte[] padBytes(byte[] in, int length, int value)
public byte[] signedInt(int s)
public byte signedByte(int s)
public byte[] unsignedLongInt(int s)
public byte[] unsignedLongInt(long s)
public byte[] unsignedInt(int s)
public int unsignedByte(int b)
public int maxPower2(int value)
public int log(int x, int base)
public byte[] toByteArray(int[] s)
public byte[] insertIntoArray(int index, byte[] insertTo, byte[] data) throws java.io.IOException
java.io.IOException
public byte[] updateDataAtLocation(byte[] data, byte[] update, int offset)
public byte[] writeCommand(java.lang.String cmd) throws java.io.IOException
cmd
- the command (without the ESCAPE character)java.io.IOException
- In case of an I/O errorCopyright 1999-2016 The Apache Software Foundation. All Rights Reserved.