Parsing is done by calling the static parse methods.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private byte[] | bytes
The property list data. |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private int | majorVersion
Major version of the property list format |
| private int | minorVersion
Minor version of the property list format |
| private int | |
| private int | objectRefSize
Length of an object reference in bytes |
| private int | |
| private int | |
| private static final int | |
| private final HashMap | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int |
| Access | Constructor and Description |
|---|---|
| private | BinaryPropertyListParser()
Protected constructor so that instantiation is fully controlled by the static parse methods. |
| Modifier and Type | Method and Description |
|---|---|
| private static String | |
| private String | |
| private String | |
| private int | |
| public static byte[] | Returns: The copied array.The source array. src, int The index from which to start copying. startIndex, int The index until which to copy. endIndex)Copies a part of a byte array into a new array. |
| private NSObject | Returns: The root object of the property list. This is usually aNSDictionary but can also be a NSArray.The binary property list's data. data)Parses a binary property list from a byte array. |
| private int | |
| private boolean | |
| public static NSObject | Returns: The root object of the property list. This is usually aNSDictionary but can also be a NSArray.The binary property list file f)Parses a binary property list file. |
| public static NSObject | Returns: The root object of the property list. This is usually aNSDictionary but can also be a NSArray.The path to the binary property list file path)Parses a binary property list file. |
| public static NSObject | Returns: The root object of the property list. This is usually aNSDictionary but can also be a NSArray.The input stream that points to the property list's data. is)Parses a binary property list from an input stream. |
| public static NSObject | Returns: The root object of the property list. This is usually aNSDictionary but can also be a NSArray.The binary property list's data. data)Parses a binary property list from a byte array. |
| private NSArray | |
| private NSData | |
| private NSDate | |
| private NSDictionary | |
| public static double | Returns: The double represented by the given bytes.The bytes representing the double. bytes)Parses a double from a (big-endian) byte array. |
| public static double | Returns: The double represented by the given bytes.The bytes representing the double. bytes, int Beginning of the double in the byte array. startIndex, int End of the double in the byte array. endIndex)Parses a double from a (big-endian) byte array. |
| public static long | Returns: The long integer represented by the given bytes.The bytes representing the long integer. bytes)Parses a long from a (big-endian) byte array. |
| public static long | Returns: The long integer represented by the given bytes.The bytes representing the long integer. bytes, int Beginning of the long in the byte array. startIndex, int End of the long in the byte array. endIndex)Parses a long from a (big-endian) byte array. |
| private NSNumber | |
| private NSObject | Returns: The parsed object.The stack to keep track of parsed objects and detect cyclic references. stack, int The object ID. obj)Parses an object inside the currently parsed binary property list. |
| private int | |
| private int | |
| private NSSet | |
| private NSObject | |
| private NSString | parseString(int offset, int objInfo, BiFunction<Integer, Integer, Integer> stringLengthCalculator, String charsetName)
|
| private UID | |
| public static long | Returns: The unsigned integer represented by the given bytes.The byte array containing the unsigned integer. bytes)Parses an unsigned integers from a byte array. |
| public static long | Returns: The unsigned integer represented by the given bytes.The byte array containing the unsigned integer. bytes, int Beginning of the unsigned int in the byte array. startIndex, int End of the unsigned int in the byte array. endIndex)Parses an unsigned integer from a byte array. |
| private int[] |
| ARRAY_TYPE | back to summary |
|---|---|
| private static final int ARRAY_TYPE | |
| ASCII_STRING_TYPE | back to summary |
|---|---|
| private static final int ASCII_STRING_TYPE | |
| bytes | back to summary |
|---|---|
| private byte[] bytes The property list data. | |
| DATA_TYPE | back to summary |
|---|---|
| private static final int DATA_TYPE | |
| DATE_TYPE | back to summary |
|---|---|
| private static final int DATE_TYPE | |
| DICTIONARY_TYPE | back to summary |
|---|---|
| private static final int DICTIONARY_TYPE | |
| INT_TYPE | back to summary |
|---|---|
| private static final int INT_TYPE | |
| majorVersion | back to summary |
|---|---|
| private int majorVersion Major version of the property list format
| |
| minorVersion | back to summary |
|---|---|
| private int minorVersion Minor version of the property list format
| |
| numObjects | back to summary |
|---|---|
| private int numObjects | |
| objectRefSize | back to summary |
|---|---|
| private int objectRefSize Length of an object reference in bytes | |
| offsetSize | back to summary |
|---|---|
| private int offsetSize | |
| offsetTableOffset | back to summary |
|---|---|
| private int offsetTableOffset | |
| ORDERED_SET_TYPE | back to summary |
|---|---|
| private static final int ORDERED_SET_TYPE | |
| parsedObjects | back to summary |
|---|---|
| private final HashMap<Integer, NSObject> parsedObjects | |
| REAL_TYPE | back to summary |
|---|---|
| private static final int REAL_TYPE | |
| SET_TYPE | back to summary |
|---|---|
| private static final int SET_TYPE | |
| SIMPLE_TYPE | back to summary |
|---|---|
| private static final int SIMPLE_TYPE | |
| UID_TYPE | back to summary |
|---|---|
| private static final int UID_TYPE | |
| UTF16_STRING_TYPE | back to summary |
|---|---|
| private static final int UTF16_STRING_TYPE | |
| UTF8_STRING_TYPE | back to summary |
|---|---|
| private static final int UTF8_STRING_TYPE | |
| BinaryPropertyListParser | back to summary |
|---|---|
| private BinaryPropertyListParser() Protected constructor so that instantiation is fully controlled by the static parse methods. | |
| buildLengthError | back to summary |
|---|---|
| private static String buildLengthError(int offset, String objectType) | |
| buildTypeError | back to summary |
|---|---|
| private String buildTypeError(int offset) | |
| buildTypeError | back to summary |
|---|---|
| private String buildTypeError(int offset, String objectType) | |
| calculateUtf8StringLength | back to summary |
|---|---|
| private int calculateUtf8StringLength(int offset, int numCharacters) | |
| copyOfRange | back to summary |
|---|---|
| public static byte[] copyOfRange(byte[] src, int startIndex, int endIndex) Copies a part of a byte array into a new array.
| |
| doParse | back to summary |
|---|---|
| private NSObject doParse(byte[] data) throws PropertyListFormatException Parses a binary property list from a byte array.
| |
| getObjectOffset | back to summary |
|---|---|
| private int getObjectOffset(int obj) throws PropertyListFormatException | |
| hastUtf8Sequence | back to summary |
|---|---|
| private boolean hastUtf8Sequence(int offset, int n) | |
| parse | back to summary |
|---|---|
| public static NSObject parse(File f) throws IOException, PropertyListFormatException Parses a binary property list file.
| |
| parse | back to summary |
|---|---|
| public static NSObject parse(Path path) throws IOException, PropertyListFormatException Parses a binary property list file.
| |
| parse | back to summary |
|---|---|
| public static NSObject parse(InputStream is) throws IOException, PropertyListFormatException Parses a binary property list from an input stream. This method does not close the specified input stream.
| |
| parse | back to summary |
|---|---|
| public static NSObject parse(byte[] data) throws PropertyListFormatException, UnsupportedEncodingException Parses a binary property list from a byte array.
| |
| parseArray | back to summary |
|---|---|
| private NSArray parseArray(int offset, int objInfo, ParsedObjectStack stack) throws PropertyListFormatException, UnsupportedEncodingException | |
| parseData | back to summary |
|---|---|
| private NSData parseData(int offset, int objInfo) throws PropertyListFormatException | |
| parseDate | back to summary |
|---|---|
| private NSDate parseDate(int offset, int objInfo) throws PropertyListFormatException | |
| parseDictionary | back to summary |
|---|---|
| private NSDictionary parseDictionary(int offset, int objInfo, ParsedObjectStack stack) throws PropertyListFormatException, UnsupportedEncodingException | |
| parseDouble | back to summary |
|---|---|
| public static double parseDouble(byte[] bytes) Parses a double from a (big-endian) byte array.
| |
| parseDouble | back to summary |
|---|---|
| public static double parseDouble(byte[] bytes, int startIndex, int endIndex) Parses a double from a (big-endian) byte array.
| |
| parseLong | back to summary |
|---|---|
| public static long parseLong(byte[] bytes) Parses a long from a (big-endian) byte array.
| |
| parseLong | back to summary |
|---|---|
| public static long parseLong(byte[] bytes, int startIndex, int endIndex) Parses a long from a (big-endian) byte array.
| |
| parseNumber | back to summary |
|---|---|
| private NSNumber parseNumber(int offset, int objInfo, int integer) throws PropertyListFormatException | |
| parseObject | back to summary |
|---|---|
| private NSObject parseObject(ParsedObjectStack stack, int obj) throws PropertyListFormatException Parses an object inside the currently parsed binary property list. For the format specification check Apple's binary property list parser implementation.
| |
| parseObjectReference | back to summary |
|---|---|
| private int parseObjectReference(int offset) throws PropertyListFormatException | |
| parseObjectReferenceFromList | back to summary |
|---|---|
| private int parseObjectReferenceFromList(int baseOffset, int objectIndex) throws PropertyListFormatException | |
| parseSet | back to summary |
|---|---|
| private NSSet parseSet(int offset, int objInfo, boolean ordered, ParsedObjectStack stack) throws PropertyListFormatException, UnsupportedEncodingException | |
| parseSimpleObject | back to summary |
|---|---|
| private NSObject parseSimpleObject(int offset, int objInfo, int obj) throws PropertyListFormatException | |
| parseString | back to summary |
|---|---|
| private NSString parseString(int offset, int objInfo, BiFunction<Integer, Integer, Integer> stringLengthCalculator, String charsetName) throws PropertyListFormatException, UnsupportedEncodingException | |
| parseUid | back to summary |
|---|---|
| private UID parseUid(int obj, int offset, int length) throws PropertyListFormatException | |
| parseUnsignedInt | back to summary |
|---|---|
| public static long parseUnsignedInt(byte[] bytes) Parses an unsigned integers from a byte array.
| |
| parseUnsignedInt | back to summary |
|---|---|
| public static long parseUnsignedInt(byte[] bytes, int startIndex, int endIndex) Parses an unsigned integer from a byte array.
| |
| readLengthAndOffset | back to summary |
|---|---|
| private int[] readLengthAndOffset(int objInfo, int offset) throws PropertyListFormatException | |