Class UnicodeEscapeProcessingProvider
java.lang.Object
com.github.javaparser.UnicodeEscapeProcessingProvider
- All Implemented Interfaces:
Provider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classProcessor keeping track of the current line and column in a stream of incoming characters.static final classAn algorithm mappingPositionform two corresponding files.private static final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate char[]private Providerprivate final UnicodeEscapeProcessingProvider.LineCounterprivate intThe number of characters in_data.private final UnicodeEscapeProcessingProvider.PositionMappingBuilderprivate final UnicodeEscapeProcessingProvider.LineCounterprivate intThe position in_datawhere to read the next source character from.private static final charprivate static final charprivate static final intprivate static final char -
Constructor Summary
ConstructorsConstructorDescriptionUnicodeEscapeProcessingProvider(int bufferSize, Provider input) Creates aUnicodeEscapeProcessingProvider.Creates aUnicodeEscapeProcessingProvider. -
Method Summary
Modifier and TypeMethodDescriptionprivate intprivate intclearBackSlashSeen(int next) voidclose()Closes the stream and releases any system resources associated with it.private static intdigit(int ch) private intTheUnicodeEscapeProcessingProvider.LineCounterof the input file.TheUnicodeEscapeProcessingProvider.LineCounterof the output file.TheUnicodeEscapeProcessingProvider.PositionMappingbeing built during processing the file.private booleanprivate intRetrieves the next un-escaped character from the buffered_input.private intProcesses column/line information from the input file.private intProduces the next un-escaped character to be written to the output.private voidpushBack(int ch) private voidpushBackUs(int cnt) intread(char[] buffer, int offset, int len) Reads characters into an arrayprivate intreadDigits(int uCnt, int next3) private int
-
Field Details
-
LF
private static final char LF- See Also:
-
CR
private static final char CR- See Also:
-
BACKSLASH
private static final char BACKSLASH- See Also:
-
EOF
private static final int EOF- See Also:
-
_data
private char[] _data -
_len
private int _lenThe number of characters in_data. -
_pos
private int _posThe position in_datawhere to read the next source character from. -
_backslashSeen
private boolean _backslashSeen -
_inputLine
-
_outputLine
-
_mappingBuilder
-
_input
-
-
Constructor Details
-
UnicodeEscapeProcessingProvider
Creates aUnicodeEscapeProcessingProvider. -
UnicodeEscapeProcessingProvider
Creates aUnicodeEscapeProcessingProvider.
-
-
Method Details
-
getInputCounter
TheUnicodeEscapeProcessingProvider.LineCounterof the input file. -
getOutputCounter
TheUnicodeEscapeProcessingProvider.LineCounterof the output file. -
read
Description copied from interface:ProviderReads characters into an array- Specified by:
readin interfaceProvider- Parameters:
buffer- Destination bufferoffset- Offset at which to start storing characterslen- The maximum possible number of characters to read- Returns:
- The number of characters read, or -1 if all read
- Throws:
IOException
-
close
Description copied from interface:ProviderCloses the stream and releases any system resources associated with it.- Specified by:
closein interfaceProvider- Throws:
IOException
-
nextOutputChar
Produces the next un-escaped character to be written to the output.- Returns:
- The next character or
-1if no more characters are available. - Throws:
IOException
-
clearBackSlashSeen
private int clearBackSlashSeen(int next) -
backSlashSeen
- Throws:
IOException
-
unicodeStartSeen
- Throws:
IOException
-
readDigits
- Throws:
IOException
-
pushBackUs
private void pushBackUs(int cnt) -
digit
private static int digit(int ch) -
nextInputChar
Processes column/line information from the input file.- Returns:
- The next character or
-1if no more input is available. - Throws:
IOException
-
nextBufferedChar
Retrieves the next un-escaped character from the buffered_input.- Returns:
- The next character or
-1if no more input is available. - Throws:
IOException
-
isBufferEmpty
private boolean isBufferEmpty() -
fillBuffer
- Throws:
IOException
-
pushBack
private void pushBack(int ch) -
getPositionMapping
TheUnicodeEscapeProcessingProvider.PositionMappingbeing built during processing the file.
-