Package com.github.javaparser
Class LineEndingProcessingProvider
- java.lang.Object
-
- com.github.javaparser.LineEndingProcessingProvider
-
-
Field Summary
Fields Modifier and Type Field Description private char[]_dataThe buffer that we're storing data within.private Provider_inputThe "other" provider which we are wrapping around / reading from.private int_lenThe number of characters in_data.private int_posThe position in_datawhere to read the next source character from.private static intDEFAULT_BUFFER_SIZEprivate static intEOFprivate java.util.Map<LineSeparator,java.lang.Integer>eolCounts
-
Constructor Summary
Constructors Constructor Description LineEndingProcessingProvider(int bufferSize, Provider input)LineEndingProcessingProvider(Provider input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the stream and releases any system resources associated with it.private intfillBuffer()LineSeparatorgetDetectedLineEnding()private booleanisBufferEmpty()private intnextBufferedChar()Retrieves the next un-escaped character from the buffered_input.intread(char[] buffer, int offset, int len)Reads characters into an array
-
-
-
Field Detail
-
EOF
private static final int EOF
- See Also:
- Constant Field Values
-
DEFAULT_BUFFER_SIZE
private static final int DEFAULT_BUFFER_SIZE
- See Also:
- Constant Field Values
-
_input
private final Provider _input
The "other" provider which we are wrapping around / reading from.
-
_data
private final char[] _data
The buffer that we're storing data within.
-
_len
private int _len
The number of characters in_data.
-
_pos
private int _pos
The position in_datawhere to read the next source character from.
-
eolCounts
private final java.util.Map<LineSeparator,java.lang.Integer> eolCounts
-
-
Method Detail
-
close
public void close() throws java.io.IOExceptionDescription copied from interface:ProviderCloses the stream and releases any system resources associated with it.
-
fillBuffer
private int fillBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
getDetectedLineEnding
public LineSeparator getDetectedLineEnding()
-
isBufferEmpty
private boolean isBufferEmpty()
-
nextBufferedChar
private int nextBufferedChar() throws java.io.IOExceptionRetrieves the next un-escaped character from the buffered_input.- Returns:
- The next character or
-1if no more input is available. - Throws:
java.io.IOException
-
read
public int read(char[] buffer, int offset, int len) throws java.io.IOExceptionDescription copied from interface:ProviderReads characters into an array
-
-