org.apache.derby.iapi.services.io
Class FormatIdUtil
java.lang.Object
org.apache.derby.iapi.services.io.FormatIdUtil
- public final class FormatIdUtil
- extends java.lang.Object
Utility class with static methods for constructing and reading the byte array
representation of format id's.
This utility supports a number of families of format ids. The byte array
form of each family is a different length. In all cases the first two bits
of the first byte indicate the family for an id. The list below describes
each family and gives its two bit identifier in parens.
- (0) - The format id is a one byte number between 0 and 63 inclusive.
The byte[] encoding fits in one byte.
- (1) - The format id is a two byte number between 16384 to 32767
inclusive. The byte[] encoding stores the high order byte
first.
- (2) - The format id is four byte number between 2147483648 and
3221225471 inclusive. The byte[] encoding stores the high
order byte first.
- (3) - Future expansion.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FormatIdUtil
private FormatIdUtil()
getFormatIdByteLength
public static int getFormatIdByteLength(int formatId)
writeFormatIdInteger
public static void writeFormatIdInteger(java.io.DataOutput out,
int formatId)
throws java.io.IOException
- Throws:
java.io.IOException
readFormatIdInteger
public static int readFormatIdInteger(java.io.DataInput in)
throws java.io.IOException
- Throws:
java.io.IOException
readFormatIdInteger
public static int readFormatIdInteger(byte[] data)
formatIdToString
public static java.lang.String formatIdToString(int fmtId)
Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.