Top Description Fields Constructors Methods
com.jogamp.gluegen.pcpp

public Class ConcatenatingReader

extends FilterReader
Class Inheritance
Imports
java.io.*

A Reader implementation which finds lines ending in the backslash character ('\') and concatenates them with the next line.

Field Summary

Modifier and TypeField and Description
private char[]
private int
private static String
private final BufferedReader
Inherited from java.io.FilterReader:
in

Constructor Summary

AccessConstructor and Description
public
ConcatenatingReader(final BufferedReader in)

This class requires that the input reader be a BufferedReader so it can do line-oriented operations.

Method Summary

Modifier and TypeMethod and Description
public void
mark(final int
Limit on the number of characters that may be read while still preserving the mark. After reading this many characters, attempting to reset the stream may fail.
readAheadLimit
)

Overrides java.io.FilterReader.mark.

Marks the present position in the stream.
public boolean
markSupported()

Overrides java.io.FilterReader.markSupported.

Tells whether this stream supports the mark() operation.
private void
public int
read()

Overrides java.io.FilterReader.read.

Reads a single character.
public int
read(final char[]
Destination buffer
cbuf
,
int
Offset at which to start storing characters
off
,
int
Maximum number of characters to read
len
)

Overrides java.io.FilterReader.read.

Reads characters into a portion of an array.
public boolean
ready()

Overrides java.io.FilterReader.ready.

Tells whether this stream is ready to be read.
public void
reset()

Overrides java.io.FilterReader.reset.

Resets the stream.
public long
skip(long
The number of characters to skip
n
)

Overrides java.io.FilterReader.skip.

Skips characters.
Inherited from java.io.FilterReader:
close

Field Detail

curBufback to summary
private char[] curBuf
curPosback to summary
private int curPos
newlineback to summary
private static String newline
readerback to summary
private final BufferedReader reader

Constructor Detail

ConcatenatingReaderback to summary
public ConcatenatingReader(final BufferedReader in)

This class requires that the input reader be a BufferedReader so it can do line-oriented operations.

Method Detail

markback to summary
public void mark(final int readAheadLimit) throws IOException

Overrides java.io.FilterReader.mark.

Doc from java.io.FilterReader.mark.

Marks the present position in the stream.

Parameters
readAheadLimit:int

Doc from java.io.Reader.mark.

Limit on the number of characters that may be read while still preserving the mark. After reading this many characters, attempting to reset the stream may fail.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
markSupportedback to summary
public boolean markSupported()

Overrides java.io.FilterReader.markSupported.

Doc from java.io.FilterReader.markSupported.

Tells whether this stream supports the mark() operation.

Returns:boolean

Doc from java.io.Reader.markSupported.

true if and only if this stream supports the mark operation.

Annotations
@Override
nextLineback to summary
private void nextLine() throws IOException
readback to summary
public int read() throws IOException

Overrides java.io.FilterReader.read.

Doc from java.io.FilterReader.read.

Reads a single character.

Returns:int

Doc from java.io.Reader.read.

The character read, as an integer in the range 0 to 65535 (0x00-0xffff), or -1 if the end of the stream has been reached

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
readback to summary
public int read(final char[] cbuf, int off, int len) throws IOException

Overrides java.io.FilterReader.read.

Doc from java.io.FilterReader.read.

Reads characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.

If len is zero, then no characters are read and 0 is returned; otherwise, there is an attempt to read at least one character. If no character is available because the stream is at its end, the value -1 is returned; otherwise, at least one character is read and stored into cbuf.

Parameters
cbuf:char[]

Doc from java.io.Reader.read.

Destination buffer

off:int

Doc from java.io.Reader.read.

Offset at which to start storing characters

len:int

Doc from java.io.Reader.read.

Maximum number of characters to read

Returns:int

Doc from java.io.Reader.read.

The number of characters read, or -1 if the end of the stream has been reached

Annotations
@Override
Exceptions
IOException:

Doc from java.io.Reader.read.

If an I/O error occurs

readyback to summary
public boolean ready() throws IOException

Overrides java.io.FilterReader.ready.

Doc from java.io.FilterReader.ready.

Tells whether this stream is ready to be read.

Returns:boolean

Doc from java.io.Reader.ready.

True if the next read() is guaranteed not to block for input, false otherwise. Note that returning false does not guarantee that the next read will block.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
resetback to summary
public void reset() throws IOException

Overrides java.io.FilterReader.reset.

Doc from java.io.FilterReader.reset.

Resets the stream.

Annotations
@Override
Exceptions
IOException:
If an I/O error occurs
skipback to summary
public long skip(long n) throws IOException

Overrides java.io.FilterReader.skip.

Doc from java.io.FilterReader.skip.

Skips characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached. If the stream is already at its end before this method is invoked, then no characters are skipped and zero is returned.

Parameters
n:long

Doc from java.io.Reader.skip.

The number of characters to skip

Returns:long

Doc from java.io.Reader.skip.

The number of characters actually skipped

Annotations
@Override
Exceptions
IOException:

Doc from java.io.Reader.skip.

If an I/O error occurs