java.lang.Object
org.codelibs.jcifs.smb.pac.PacUnicodeString
Represents a Unicode string structure as used in PAC data.
This class encapsulates the metadata for a Unicode string including its length,
maximum length, and pointer to the actual string data.
-
Constructor Summary
ConstructorsConstructorDescriptionPacUnicodeString(short length, short maxLength, int pointer) Constructs a new PacUnicodeString instance. -
Method Summary
Modifier and TypeMethodDescriptionValidates the provided string against this structure's metadata.shortGets the actual length of the string in bytes.shortGets the maximum allocated length for the string in bytes.intGets the pointer/offset to the string data.
-
Constructor Details
-
PacUnicodeString
public PacUnicodeString(short length, short maxLength, int pointer) Constructs a new PacUnicodeString instance.- Parameters:
length- the actual length of the string in bytesmaxLength- the maximum allocated length for the string in bytespointer- the pointer/offset to the string data
-
-
Method Details
-
getLength
public short getLength()Gets the actual length of the string in bytes.- Returns:
- the string length
-
getMaxLength
public short getMaxLength()Gets the maximum allocated length for the string in bytes.- Returns:
- the maximum string length
-
getPointer
public int getPointer()Gets the pointer/offset to the string data.- Returns:
- the pointer to the string data
-
check
Validates the provided string against this structure's metadata. Checks that the string length matches the expected length and that null strings have a zero pointer.- Parameters:
string- the string to validate- Returns:
- the validated string
- Throws:
PACDecodingException- if validation fails
-