Package yapion.io
Class YAPIONInputStream
- java.lang.Object
-
- yapion.io.YAPIONInputStream
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class YAPIONInputStream extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description YAPIONInputStream(java.io.InputStream inputStream)Creates a YAPIONInputStream from an InputStream.
-
Method Summary
Modifier and Type Method Description intavailable()voidclose()Closes the InputStream.YAPIONObjectread()Read and parses the next YAPIONObject.intreadByte()java.lang.ObjectreadObject()Reads, parses and deserializes the next YAPIONObject.java.lang.ObjectreadObject(TypeReMapper typeReMapper)Reads, parses and deserializes the next YAPIONObject.longskip(long skip)
-
-
-
Constructor Detail
-
YAPIONInputStream
public YAPIONInputStream(java.io.InputStream inputStream)
Creates a YAPIONInputStream from an InputStream. It is encouraged to input some kind ofBufferedInputStream. This will increase theread()speed tremendously.- Parameters:
inputStream- the InputStream
-
-
Method Detail
-
available
public int available() throws java.io.IOException- Throws:
java.io.IOException
-
readByte
public int readByte() throws java.io.IOException- Throws:
java.io.IOException
-
skip
public long skip(long skip) throws java.io.IOException- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOExceptionCloses the InputStream.- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException- byInputStream.close()
-
read
public YAPIONObject read()
Read and parses the next YAPIONObject.- Returns:
- the next YAPIONObject
- Throws:
YAPIONIOException- if the inputStream was closed
-
readObject
public java.lang.Object readObject()
Reads, parses and deserializes the next YAPIONObject.- Returns:
- the next Object
- Throws:
YAPIONIOException- if the inputStream was closed
-
readObject
public java.lang.Object readObject(TypeReMapper typeReMapper)
Reads, parses and deserializes the next YAPIONObject.- Parameters:
typeReMapper- theTypeReMapperto use- Returns:
- the next Object
- Throws:
YAPIONIOException- if the inputStream was closed
-
-