Class NoFetchingInput
- java.lang.Object
-
- java.io.InputStream
-
- com.esotericsoftware.kryo.io.Input
-
- org.apache.flink.api.java.typeutils.runtime.NoFetchingInput
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
@Internal public class NoFetchingInput extends com.esotericsoftware.kryo.io.Input
-
-
Constructor Summary
Constructors Constructor Description NoFetchingInput(InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canReadInt()
boolean
canReadLong()
boolean
eof()
int
read()
int
read(byte[] bytes, int offset, int count)
void
readBytes(byte[] bytes, int offset, int count)
protected int
require(int required)
Require makes sure that at least required number of bytes are kept in the buffer.void
skip(int count)
-
Methods inherited from class com.esotericsoftware.kryo.io.Input
available, close, fill, getBuffer, getInputStream, limit, position, read, readBoolean, readByte, readBytes, readBytes, readByteUnsigned, readChar, readChars, readDouble, readDouble, readDoubles, readFloat, readFloat, readFloats, readInt, readInt, readInts, readInts, readLong, readLong, readLongs, readLongs, readShort, readShorts, readShortUnsigned, readString, readStringBuilder, readVarInt, readVarLong, rewind, setBuffer, setBuffer, setInputStream, setLimit, setPosition, setTotal, skip, total
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
-
-
-
Constructor Detail
-
NoFetchingInput
public NoFetchingInput(InputStream inputStream)
-
-
Method Detail
-
eof
public boolean eof()
- Overrides:
eof
in classcom.esotericsoftware.kryo.io.Input
-
read
public int read() throws com.esotericsoftware.kryo.KryoException
- Overrides:
read
in classcom.esotericsoftware.kryo.io.Input
- Throws:
com.esotericsoftware.kryo.KryoException
-
canReadInt
public boolean canReadInt() throws com.esotericsoftware.kryo.KryoException
- Overrides:
canReadInt
in classcom.esotericsoftware.kryo.io.Input
- Throws:
com.esotericsoftware.kryo.KryoException
-
canReadLong
public boolean canReadLong() throws com.esotericsoftware.kryo.KryoException
- Overrides:
canReadLong
in classcom.esotericsoftware.kryo.io.Input
- Throws:
com.esotericsoftware.kryo.KryoException
-
require
protected int require(int required) throws com.esotericsoftware.kryo.KryoException
Require makes sure that at least required number of bytes are kept in the buffer. If not, then it will load exactly the difference between required and currently available number of bytes. Thus, it will only load the data which is required and never prefetch data.- Overrides:
require
in classcom.esotericsoftware.kryo.io.Input
- Parameters:
required
- the number of bytes being available in the buffer- Returns:
- the number of bytes remaining, which is equal to required
- Throws:
com.esotericsoftware.kryo.KryoException
-
read
public int read(byte[] bytes, int offset, int count) throws com.esotericsoftware.kryo.KryoException
- Overrides:
read
in classcom.esotericsoftware.kryo.io.Input
- Throws:
com.esotericsoftware.kryo.KryoException
-
skip
public void skip(int count) throws com.esotericsoftware.kryo.KryoException
- Overrides:
skip
in classcom.esotericsoftware.kryo.io.Input
- Throws:
com.esotericsoftware.kryo.KryoException
-
readBytes
public void readBytes(byte[] bytes, int offset, int count) throws com.esotericsoftware.kryo.KryoException
- Overrides:
readBytes
in classcom.esotericsoftware.kryo.io.Input
- Throws:
com.esotericsoftware.kryo.KryoException
-
-