Package com.github.javaparser
Class LineEndingProcessingProvider
- java.lang.Object
-
- com.github.javaparser.LineEndingProcessingProvider
-
-
Field Summary
Fields Modifier and Type Field Description private char[]
_data
The buffer that we're storing data within.private Provider
_input
The "other" provider which we are wrapping around / reading from.private int
_len
The number of characters in_data
.private int
_pos
The position in_data
where to read the next source character from.private static int
DEFAULT_BUFFER_SIZE
private static int
EOF
private 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 void
close()
Closes the stream and releases any system resources associated with it.private int
fillBuffer()
LineSeparator
getDetectedLineEnding()
private boolean
isBufferEmpty()
private int
nextBufferedChar()
Retrieves the next un-escaped character from the buffered_input
.int
read(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_data
where 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.IOException
Description copied from interface:Provider
Closes 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.IOException
Retrieves the next un-escaped character from the buffered_input
.- Returns:
- The next character or
-1
if no more input is available. - Throws:
java.io.IOException
-
read
public int read(char[] buffer, int offset, int len) throws java.io.IOException
Description copied from interface:Provider
Reads characters into an array
-
-