public final class PCLByteWriterUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static byte[] |
insertIntoArray(int index,
byte[] insertTo,
byte[] data) |
static int |
log(int x,
int base) |
static int |
maxPower2(int value) |
static byte[] |
padBytes(byte[] in,
int length) |
static byte[] |
padBytes(byte[] in,
int length,
int value) |
static byte |
signedByte(int s) |
static byte[] |
signedInt(int s) |
static byte[] |
toByteArray(int[] s) |
static int |
unsignedByte(int b) |
static byte[] |
unsignedInt(int s) |
static byte[] |
unsignedLongInt(int s) |
static byte[] |
unsignedLongInt(long s) |
static byte[] |
updateDataAtLocation(byte[] data,
byte[] update,
int offset) |
static byte[] |
writeCommand(java.lang.String cmd)
Writes a PCL escape command to the output stream.
|
public static byte[] padBytes(byte[] in, int length)
public static byte[] padBytes(byte[] in, int length, int value)
public static byte[] signedInt(int s)
public static byte signedByte(int s)
public static byte[] unsignedLongInt(int s)
public static byte[] unsignedLongInt(long s)
public static byte[] unsignedInt(int s)
public static int unsignedByte(int b)
public static int maxPower2(int value)
public static int log(int x, int base)
public static byte[] toByteArray(int[] s)
public static byte[] insertIntoArray(int index, byte[] insertTo, byte[] data) throws java.io.IOException
java.io.IOException
public static byte[] updateDataAtLocation(byte[] data, byte[] update, int offset)
public static 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-2017 The Apache Software Foundation. All Rights Reserved.