com.eyebolt.common
Class FlattenableInteger
java.lang.Object
|
+--com.eyebolt.common.FlattenableInteger
- public class FlattenableInteger
- extends java.lang.Object
Helper function for flattening basic types
- Version:
- 0.01, 6 Jan 1997
- Author:
- John Gardner
Field Summary |
private int |
value
|
Constructor Summary |
FlattenableInteger(int val)
Constructor for the FlattenableInteger object |
Method Summary |
void |
flattenAt(byte[] buf)
Flatten this object to a buffer. |
void |
flattenAt(byte[] buf,
int offset)
Flatten this object to a buffer. |
static int |
unFlattenFrom(byte[] buf)
Unflatten this object from a buffer. |
static int |
unFlattenFrom(byte[] buf,
int offset)
Unflatten this object from a buffer. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
value
private int value
FlattenableInteger
public FlattenableInteger(int val)
- Constructor for the FlattenableInteger object
- Parameters:
val
- Description of Parameter
flattenAt
public void flattenAt(byte[] buf)
- Flatten this object to a buffer.
- Parameters:
buf
- destination buffer
flattenAt
public void flattenAt(byte[] buf,
int offset)
- Flatten this object to a buffer.
- Parameters:
buf
- destination bufferoffset
- offset into buffer at which to begin flattening.
unFlattenFrom
public static int unFlattenFrom(byte[] buf)
- Unflatten this object from a buffer.
- Parameters:
buf
- buffer from which to unflatten.- Returns:
- returns the integer obtained by unflattening.
unFlattenFrom
public static int unFlattenFrom(byte[] buf,
int offset)
- Unflatten this object from a buffer.
- Parameters:
buf
- buffer from which to unflatten.offset
- offset into buffer at which to begin unflattening.- Returns:
- returns the integer obtained by unflattening.
Copyright © 2001 Eyebolt, Inc.