java.lang.Object
swim.codec.Input
swim.codec.InputBuffer
Non-blocking token stream buffer.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract byte[]array()abstract intabstract intcapacity()abstract InputBufferclone()Returns an independently positioned view into the token stream, initialized with identical state to thisInput.static InputBufferdone()Returns anInputBufferin the done state.static InputBufferReturns anInputBufferin the done state, at themarkposition of a token stream logically identified byid.static InputBufferdone(Object id, Mark mark, InputSettings settings) Returns anInputBufferin the done state, at themarkposition of a token stream logically identified byid, with the givensettings.static InputBufferdone(InputSettings settings) Returns anInputBufferin the done state, with the givensettings.static InputBufferempty()Returns anInputBufferin the empty state.static InputBufferReturns anInputBufferin the empty state, at themarkposition of a token stream logically identified byid.static InputBufferempty(Object id, Mark mark, InputSettings settings) Returns anInputBufferin the empty state, at themarkposition of a token stream logically identified byid, with the givensettings.static InputBufferempty(InputSettings settings) Returns anInputBufferin the empty state, with the givensettings.static InputBufferReturns anInputBufferin the error state, with the given inputerror.static InputBufferReturns anInputBufferin the error state, with the given inputerror, at themarkposition of a token stream logically identified byid.static InputBuffererror(Throwable error, Object id, Mark mark, InputSettings settings) Returns anInputBufferin the error state, with the given inputerror, at themarkposition of a token stream logically identified byid, with the givensettings.static InputBuffererror(Throwable error, InputSettings settings) Returns anInputBufferin the error state, with the given inputerrorandsettings.Returns anInputequivalent to thisInput, but whose behavior may be altered by the given out-of-bandcondition.abstract intget(int index) abstract booleanhas(int index) abstract InputBufferReturns anInputequivalent to thisInput, but logically identified by the given–possiblynull–id.abstract intindex()abstract InputBufferindex(int index) abstract InputBufferisPart(boolean isPart) Returns a partialInputequivalent to thisInput, ifisPartistrue; returns a finalInputequivalent to thisInputifisPartisfalse.abstract intlimit()abstract InputBufferlimit(int limit) abstract InputBufferReturns anInputequivalent to thisInput, but logically positioned at the givenmark.abstract intabstract InputBufferReturns anInputequivalent to thisInput, but repositioned to the givenmark.abstract voidset(int index, int token) abstract InputBuffersettings(InputSettings settings) Returns anInputequivalent to thisInput, but with the given inputsettings.abstract InputBufferstep()Returns anInputequivalent to thisInput, but advanced to the next token.abstract InputBufferstep(int offset)
-
Constructor Details
-
InputBuffer
public InputBuffer()
-
-
Method Details
-
isPart
Description copied from class:InputReturns a partialInputequivalent to thisInput, ifisPartistrue; returns a finalInputequivalent to thisInputifisPartisfalse. The caller's reference tothisInputshould be replaced by the returnedInput. -
index
public abstract int index() -
index
-
limit
public abstract int limit() -
limit
-
capacity
public abstract int capacity() -
remaining
public abstract int remaining() -
array
public abstract byte[] array() -
arrayOffset
public abstract int arrayOffset() -
has
public abstract boolean has(int index) -
get
public abstract int get(int index) -
set
public abstract void set(int index, int token) -
step
Description copied from class:InputReturns anInputequivalent to thisInput, but advanced to the next token. Returns anInputin the error state if thisInputis not in the cont state. The caller's reference tothisInputshould be replaced by the returnedInput. -
step
-
seek
Description copied from class:InputReturns anInputequivalent to thisInput, but repositioned to the givenmark. Returns anInputin the error state if thisInputdoes not support seeking, or if thisInputis unable to reposition to the givenmark. The caller's reference tothisInputshould be replaced by the returnedInput. -
fork
Description copied from class:InputReturns anInputequivalent to thisInput, but whose behavior may be altered by the given out-of-bandcondition. The caller's reference tothisInputshould be replaced by the returnedInput. -
id
Description copied from class:InputReturns anInputequivalent to thisInput, but logically identified by the given–possiblynull–id. The caller's reference tothisInputshould be replaced by the returnedInput. -
mark
Description copied from class:InputReturns anInputequivalent to thisInput, but logically positioned at the givenmark. The physical position in the input stream is not modified. The caller's reference tothisInputshould be replaced by the returnedInput. -
settings
Description copied from class:InputReturns anInputequivalent to thisInput, but with the given inputsettings. The caller's reference tothisInputshould be replaced by the returnedInput. -
clone
Description copied from class:InputReturns an independently positioned view into the token stream, initialized with identical state to thisInput. -
empty
Returns anInputBufferin the empty state. -
empty
Returns anInputBufferin the empty state, with the givensettings. -
empty
Returns anInputBufferin the empty state, at themarkposition of a token stream logically identified byid. -
empty
Returns anInputBufferin the empty state, at themarkposition of a token stream logically identified byid, with the givensettings. -
done
Returns anInputBufferin the done state. -
done
Returns anInputBufferin the done state, with the givensettings. -
done
Returns anInputBufferin the done state, at themarkposition of a token stream logically identified byid. -
done
Returns anInputBufferin the done state, at themarkposition of a token stream logically identified byid, with the givensettings. -
error
Returns anInputBufferin the error state, with the given inputerror. -
error
Returns anInputBufferin the error state, with the given inputerrorandsettings. -
error
Returns anInputBufferin the error state, with the given inputerror, at themarkposition of a token stream logically identified byid. -
error
Returns anInputBufferin the error state, with the given inputerror, at themarkposition of a token stream logically identified byid, with the givensettings.
-