Class CompressedWriter
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.builder.CompressedWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteBoolean(boolean v) voidwriteByte(int v) voidwriteChars(char[] name) Write the given name UTF8 encoded.voidwriteCharsUsingLast(char[] name) Writes the given char array and remember it.voidwriteInt(int v) voidwriteIntInRange(int v, int range) Write a number v which must be0 <= v < range.voidwriteIntWithHint(int v, int[] typical) Writes v using a list of likely values "typical".voidwriteLong(long v) voidWrites the given String.voidwriteStringUsingLast(String name) Writes the given String.
-
Constructor Details
-
CompressedWriter
-
-
Method Details
-
writeBoolean
- Throws:
IOException- See Also:
-
writeByte
- Throws:
IOException- See Also:
-
writeLong
- Throws:
IOException- See Also:
-
writeInt
- Throws:
IOException- See Also:
-
writeChars
Write the given name UTF8 encoded.- Parameters:
name- chars to write- Throws:
IOException- See Also:
-
writeIntWithHint
Writes v using a list of likely values "typical". If v is element of "typical" then encode v as an index. Otherwise encoded as typical.length and plain encoded v;- Parameters:
v- the number to writetypical- a list of most used values- Throws:
IOException- See Also:
-
writeIntInRange
Write a number v which must be0 <= v < range. Otherwise IllegalArgumentException is thrown. Encodes only as many bytes as needed. I.e. skipping the high bytes.- Parameters:
v- the number to write.range- the maximal possible value of v + 1- Throws:
IOException- See Also:
-
writeStringUsingDictionary
Writes the given String. If the String was already written before its index in the dictionary is encoded as index+1. Otherwise a 0 index is encoded and then the String is encoded as UTF8 and stored into dictionary.- Parameters:
v- the String to write- Throws:
IOException- See Also:
-
writeStringUsingLast
Writes the given String. Encoded like a char array using last string.- Parameters:
name- the String to write.- Throws:
IOException- See Also:
-
writeCharsUsingLast
Writes the given char array and remember it. Encoded by writing the length of common leading chars with the last given array followed by the remaining chars using a dictionary. Works best if the names are written in binary sorted order.- Parameters:
name- the char array to write- Throws:
IOException- See Also:
-