public class DCEDataPacker
extends java.lang.Object
Contains static methods for packing/unpacking different data types into a byte buffer.
Constructor and Description |
---|
DCEDataPacker() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getDCEString(byte[] buf,
int off)
Unpack a DCE string from the buffer
|
static int |
longwordAlign(int pos)
Align a buffer offset on a longword boundary
|
static int |
putDCEString(byte[] buf,
int off,
java.lang.String str,
boolean incNul)
Pack a DCE string into the buffer
|
static int |
wordAlign(int pos)
Align a buffer offset on a longword boundary
|
public static final java.lang.String getDCEString(byte[] buf, int off) throws java.lang.IndexOutOfBoundsException
buf
- byte[]off
- intjava.lang.IndexOutOfBoundsException
- If there is not enough data in the buffer.public static final int putDCEString(byte[] buf, int off, java.lang.String str, boolean incNul)
buf
- byte[]off
- intstr
- StringincNul
- booleanpublic static final int wordAlign(int pos)
pos
- intpublic static final int longwordAlign(int pos)
pos
- intCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.