Class LineJavaCoreInputBuffer
java.lang.Object
com.ibm.dtfj.javacore.parser.framework.input.OffsetBasedJavaCoreInputBuffer
com.ibm.dtfj.javacore.parser.framework.input.LineJavaCoreInputBuffer
- All Implemented Interfaces:
IInputBuffer
Input buffer for javacore scanner. Consumes a subsection of characters from the buffer
-
Field Summary
Fields declared in class OffsetBasedJavaCoreInputBuffer
DEFAULT_LENGTH, fBuffer, fOffset, START_OFFSETModifier and TypeFieldDescriptionprotected static final intprotected StringBufferprotected intprotected static final int -
Constructor Summary
Constructors -
Method Summary
Methods declared in class OffsetBasedJavaCoreInputBuffer
charAt, endReached, isStreamEnd, length, markStreamEnd, updateOffsetModifier and TypeMethodDescriptioncharcharAt(int i) Retrieves a character at a given position.booleanprotected booleanintlength()NOTE That the length of the buffer may vary during character consumption, so it cannot be assumed to be fixed all the time.protected voidmarkStreamEnd(boolean mark) protected voidupdateOffset(int length)
-
Constructor Details
-
LineJavaCoreInputBuffer
- Throws:
IOException
-
-
Method Details
-
close
Description copied from class:OffsetBasedJavaCoreInputBufferCloses the java.io.Reader or input stream associated with this buffered reader.- Specified by:
closein interfaceIInputBuffer- Specified by:
closein classOffsetBasedJavaCoreInputBuffer- Throws:
IOException- if error encountered while closing.- See Also:
-
consume
Consumes elements from the current line.- Parameters:
amount- of characters to consume.- Returns:
- return the offset value of the consumed portion. Note that this does not return the new offset after consumption but the offset of the section being consumed.
- Throws:
IOException- if error occurs while refilling the buffer.IndexOutOfBoundsException- if length is outside buffer range- See Also:
-
nextLine
Description copied from interface:IInputBufferReads the next line if the current buffer is empty. Returns true if a new line read, false otherwise.- Throws:
IOException
-