Interface StreamingInput

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
AbstractStreamingInput, BinaryInput, JsonInput

public interface StreamingInput
extends Closeable
Input that is streamed as a set of token with values.
Author:
Andreas Holstenson
  • Method Summary

    Modifier and Type Method Description
    Token current()
    Get the current token.
    boolean getBoolean()
    Get the value as a boolean.
    default byte getByte()
    Get the value as a byte.
    byte[] getByteArray()
    Get the value as a byte[] array.
    default char getChar()
    Get the value as a character.
    double getDouble()
    Get the value as a double.
    float getFloat()
    Get the value as a float.
    int getInt()
    Get the value as an integer.
    long getLong()
    Get the value as a long.
    short getShort()
    Get the value as a short.
    String getString()
    Get the current value as a string.
    Object getValue()
    Get the current value.
    default ValueType getValueType()
    Get the type of value the input currently has.
    Token next()
    Advance to the next token.
    Token next​(Token expected)
    Advance to the next token checking that it is of a certain type.
    Token peek()
    Peek into the stream and return the next token.
    void skip()
    Skip the started object, list or value.
    void skipValue()
    If this token is a Token.KEY this will skip its value.

    Methods inherited from interface java.io.Closeable

    close