|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.common.WKConstants
public final class WKConstants
Class containing well-known or commonly-used constants and conversions.
Field Summary | |
---|---|
static byte |
BITS_PER_BYTE
The number of bits in a byte, that is, 8. |
static byte |
BITS_PER_NIBBLE
The number of bits in a nibble, that is, 4. |
static byte |
BYTES_PER_INT
The number of bytes in an int, that is, 4. |
static short |
BYTES_PER_KILOBYTE
The number of bytes per kilobyte, that is, 1024. |
static byte |
BYTES_PER_LONG
The number of bytes in a long, that is, 8. |
static byte |
BYTES_PER_SHORT
The number of bytes in a short, that is, 2. |
static byte |
CARRIAGE_RETURN
The carriage-return character, cast as a byte. |
static float |
CM_PER_INCH
The number of centimeters per inch. |
static int |
DECIPOINTS_PER_POINT
The number of decipoints per point, that is, 10. |
static short |
DEGREES_PER_CIRCLE
The number of degrees in a circle, that is, 360. |
static String |
EMPTY_STRING
An empty String useful for return values that might return "null", but could return this more safely. |
static short |
GRADS_PER_CIRCLE
The number of grads in a circle, that is, 400. |
static char |
INVALID_UNICODE_CHARACTER
Constant defining an invalid character value. |
static short |
KILOBYTES_PER_MEGABYTE
The number of kilobytes per megabytes, that is, 1024. |
static byte |
LINEFEED
The linefeed character, cast as a byte. |
static String |
LINEFEED_STRING
The linefeed character, cast as a 1-character String. |
static int |
MAX_16_BIT_UNSIGNED_VALUES
The maximum number of values that can be stored in 16 bits, that is, 65,536. |
static int |
MAX_32_BIT_UNSIGNED_INT
The maximum unsigned 32-bit value, cast as an int. |
static byte |
MAX_4_BIT_UNSIGNED_BYTE
The maximum 4-bit value, cast as a byte, that is 0xF. |
static byte |
MAX_4_BIT_UNSIGNED_VALUES
The maximum number of values that can be stored in 4 bits, that is, 16. |
static short |
MAX_7_BIT_UNSIGNED_VALUES
The maximum number of values that can be stored in 7 bits, that is, 128. |
static byte |
MAX_8_BIT_UNSIGNED_BYTE
The maximum unsigned 8-bit value, cast as a byte. |
static int |
MAX_8_BIT_UNSIGNED_INT
The maximum unsigned 8-bit value, cast as an int, that is 255 or 0xFF. |
static short |
MAX_8_BIT_UNSIGNED_VALUES
The maximum number of values that can be stored in 8 bits, that is, 256. |
static short |
MAXIMUM_INTEGRAL_COLOR_VALUE
Constant defining the largest integral color value, that is, 255. |
static int |
MILLIPOINTS_PER_POINT
The number of millipoints per point, that is, 1000. |
static short |
MILLIUNITS_PER_UNIT
The number of milli-units (thousandths of a unit) per unit, that is, 1000. |
static float |
MM_PER_CM
The number of millimeters per centimeter. |
static byte |
PERCENT_CONVERSION
The conversion factor between a percentage value and its decimal equivalent, that is, 100. |
static int |
PICAS_PER_INCH
The number of picas per inch, that is, 6. |
static int |
POINTS_PER_INCH
The number of points per inch, that is 72. |
static byte |
RADIX_BASE_10
The radix for base-10 numbers, that is, 10. |
static byte |
RADIX_BASE_16
The radix for base-16 numbers, that is, 16. |
static byte |
RADIX_BASE_2
The radix for base-2 numbers, that is, 2. |
static byte |
RADIX_BASE_8
The radix for base-8 numbers, that is, 8. |
static byte |
SHIFT_1_BYTE
The number of bits to shift for a one-byte shift. |
static byte |
SHIFT_2_BYTES
The number of bits to shift for a two-byte shift. |
static byte |
SHIFT_3_BYTES
The number of bits to shift for a three-byte shift. |
static byte |
SHIFT_4_BYTES
The number of bits to shift for a four-byte shift. |
Method Summary | |
---|---|
static float |
millipointsToPoints(int millipoints)
Converts millipoints to points. |
static int |
unsignedBytesToInt(byte byte1,
byte byte2)
Converts two unsigned bytes to an int. |
static int |
unsignedBytesToIntBE(byte[] byteArray,
int start)
Converts two unsigned big-endian bytes from an array of bytes to an int. |
static int |
unsignedBytesToIntLE(byte[] byteArray,
int start)
Converts two unsigned little-endian bytes from an array of bytes to an int. |
static long |
unsignedBytesToLong(byte byte1,
byte byte2,
byte byte3,
byte byte4)
Converts four unsigned bytes to a long. |
static long |
unsignedBytesToLongBE(byte[] byteArray,
int start)
Converts four unsigned big-endian bytes from an array of bytes to a long. |
static long |
unsignedBytesToLongLE(byte[] byteArray,
int start)
Converts four unsigned little-endian bytes from an array of bytes to a long. |
static int |
unsignedByteToInt(byte unsignedByte)
Converts one unsigned byte to its integer equivalent. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte MAX_8_BIT_UNSIGNED_BYTE
public static final int MAX_8_BIT_UNSIGNED_INT
public static final byte MAX_4_BIT_UNSIGNED_BYTE
public static final int MAX_32_BIT_UNSIGNED_INT
public static final byte MAX_4_BIT_UNSIGNED_VALUES
public static final short MAX_8_BIT_UNSIGNED_VALUES
public static final short MAX_7_BIT_UNSIGNED_VALUES
public static final int MAX_16_BIT_UNSIGNED_VALUES
public static final byte BYTES_PER_LONG
public static final byte BYTES_PER_INT
public static final byte BYTES_PER_SHORT
public static final byte BITS_PER_BYTE
public static final byte BITS_PER_NIBBLE
public static final byte SHIFT_1_BYTE
public static final byte SHIFT_2_BYTES
public static final byte SHIFT_3_BYTES
public static final byte SHIFT_4_BYTES
public static final float CM_PER_INCH
public static final float MM_PER_CM
public static final int POINTS_PER_INCH
public static final int PICAS_PER_INCH
public static final int MILLIPOINTS_PER_POINT
public static final int DECIPOINTS_PER_POINT
public static final byte CARRIAGE_RETURN
public static final byte LINEFEED
public static final String LINEFEED_STRING
public static final short BYTES_PER_KILOBYTE
public static final short KILOBYTES_PER_MEGABYTE
public static final byte PERCENT_CONVERSION
public static final byte RADIX_BASE_2
public static final byte RADIX_BASE_8
public static final byte RADIX_BASE_10
public static final byte RADIX_BASE_16
public static final short DEGREES_PER_CIRCLE
public static final short GRADS_PER_CIRCLE
public static final short MILLIUNITS_PER_UNIT
public static final String EMPTY_STRING
public static final char INVALID_UNICODE_CHARACTER
public static final short MAXIMUM_INTEGRAL_COLOR_VALUE
Method Detail |
---|
public static long unsignedBytesToLong(byte byte1, byte byte2, byte byte3, byte byte4)
byte1
- The high-order byte.byte2
- The second highest-order byte.byte3
- The third highest-order byte.byte4
- The low-order byte.
public static int unsignedByteToInt(byte unsignedByte)
unsignedByte
- The byte to be converted.
unsignedByte
.public static long unsignedBytesToLongBE(byte[] byteArray, int start)
byteArray
- The array of bytes containing the bytes to be converted.start
- The index to the first byte in the array to be converted.
This is the high-order byte of the 4 bytes. The second byte will be
indexed at start + 1, the third byte at start + 2, and the fourth byte
at start + 3.
public static long unsignedBytesToLongLE(byte[] byteArray, int start)
byteArray
- The array of bytes containing the bytes to be converted.start
- The index to the first byte in the array to be converted.
This is the low-order byte of the 4 bytes. The second byte will be
indexed at start + 1, the third byte at start + 2, and the fourth byte
(the high-order byte) at start + 3.
public static int unsignedBytesToInt(byte byte1, byte byte2)
byte1
- The high-order byte.byte2
- The low-order byte.
public static int unsignedBytesToIntBE(byte[] byteArray, int start)
byteArray
- The array of bytes containing the bytes to be converted.start
- The index to the first byte in the array to be converted.
This is the high-order byte of the 2 bytes. The second byte (the
low-order byte) will be indexed at start + 1.
public static int unsignedBytesToIntLE(byte[] byteArray, int start)
byteArray
- The array of bytes containing the bytes to be converted.start
- The index to the first byte in the array to be converted.
This is the low-order byte of the 4 bytes. The second byte (the
high-order byte) at start + 1.
public static float millipointsToPoints(int millipoints)
millipoints
- The millipoint value to be converted.
millipoints
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |