org.jfree.fonts

Class ByteAccessUtilities


public class ByteAccessUtilities
extends java.lang.Object

Reads byte-data using a Big-Endian access schema. Big-Endian is used for TrueType fonts.
Author:
Thomas Morgner

Method Summary

static byte[]
readBytes(byte[] data, int pos, int length)
static float
readFixed(byte[] data, int pos)
static int
readLong(byte[] data, int pos)
static long
readLongDateTime(byte[] data, int pos)
static short
readShort(byte[] data, int pos)
static String
readString(byte[] data, int pos, int length, String encoding)
static long
readULong(byte[] data, int pos)
static int
readUShort(byte[] data, int pos)
static String
readZString(byte[] data, int pos, int maxLength, String encoding)
static int
readZStringOffset(byte[] data, int pos, int maxLength)

Method Details

readBytes

public static byte[] readBytes(byte[] data,
                               int pos,
                               int length)

readFixed

public static float readFixed(byte[] data,
                              int pos)

readLong

public static int readLong(byte[] data,
                           int pos)

readLongDateTime

public static long readLongDateTime(byte[] data,
                                    int pos)

readShort

public static short readShort(byte[] data,
                              int pos)

readString

public static String readString(byte[] data,
                                int pos,
                                int length,
                                String encoding)
            throws org.jfree.fonts.encoding.EncodingException

readULong

public static long readULong(byte[] data,
                             int pos)

readUShort

public static int readUShort(byte[] data,
                             int pos)

readZString

public static String readZString(byte[] data,
                                 int pos,
                                 int maxLength,
                                 String encoding)
            throws org.jfree.fonts.encoding.EncodingException

readZStringOffset

public static int readZStringOffset(byte[] data,
                                    int pos,
                                    int maxLength)