Constructor and Description |
---|
ByteBufferSource(byte[] source)
Constructs the ByteBufferSource.
|
Modifier and Type | Method and Description |
---|---|
char |
charAt(int pos) |
void |
close()
Closes the source.
|
void |
deepClose()
Does a deep close of all sources and subsources associated with this
source.
|
Source |
fromActualPosition()
Creates a sub source starting from the actual position.
|
int |
getPosition()
Get the actual read position of the source.
|
boolean |
isEOF()
Checks if the end of the Source is reached.
|
int |
length() |
char |
next()
Returns the character at the given position and increases the position.
|
void |
seek(int position)
Seek to the given position
|
java.lang.CharSequence |
subSequence(int start,
int end) |
Source |
subSource(int start,
int end)
Creates a sub source of this source.
|
java.lang.String |
toString() |
public ByteBufferSource(byte[] source)
source
- public Source fromActualPosition()
Source
fromActualPosition
in interface Source
Source.fromActualPosition()
public int getPosition()
Source
getPosition
in interface Source
Source.getPosition()
public void seek(int position) throws java.io.IOException
Source
seek
in interface Source
java.io.IOException
Source.seek(int)
public char next() throws java.io.IOException
Source
next
in interface Source
java.io.IOException
Source.next()
public boolean isEOF()
Source
isEOF
in interface Source
true
if the end of the source is reachedSource.isEOF()
public int length()
length
in interface java.lang.CharSequence
CharSequence.length()
public char charAt(int pos)
charAt
in interface java.lang.CharSequence
CharSequence.charAt(int)
public Source subSource(int start, int end)
Source
subSource
in interface Source
start
- the start positionend
- the end positionSource.subSource(int, int)
public java.lang.CharSequence subSequence(int start, int end)
subSequence
in interface java.lang.CharSequence
CharSequence.subSequence(int, int)
public java.lang.String toString()
toString
in interface java.lang.CharSequence
toString
in class java.lang.Object
Object.toString()
public void close() throws java.io.IOException
Source
close
in interface Source
java.io.IOException
Source.close()
public void deepClose() throws java.io.IOException
Source
deepClose
in interface Source
java.io.IOException
Source.deepClose()
Copyright © 2021. All Rights Reserved.