public class DCEDataPacker extends 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 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,
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 String getDCEString(byte[] buf, int off) throws IndexOutOfBoundsException
buf - byte[]off - intIndexOutOfBoundsException - If there is not enough data in the buffer.public static final int putDCEString(byte[] buf,
int off,
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–2020 Alfresco Software. All rights reserved.