Package com.viaversion.viaversion.io
Class FastByteBufInputStream
java.lang.Object
java.io.InputStream
com.viaversion.viaversion.io.FastByteBufInputStream
- All Implemented Interfaces:
Closeable,DataInput,AutoCloseable
ByteBufInputStream alternative with a more fine-tuned readUTF() implementation
for fast reading of NBT strings.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintvoidmark(int readlimit) booleanintread()intread(byte[] b, int off, int len) booleanbytereadByte()charreadChar()doublefloatvoidreadFully(byte[] b) voidreadFully(byte[] b, int off, int len) intreadInt()readLine()longreadLong()shortintintreadUTF()voidreset()longskip(long n) intskipBytes(int n) Methods inherited from class java.io.InputStream
close, nullInputStream, read, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
FastByteBufInputStream
public FastByteBufInputStream(io.netty.buffer.ByteBuf buffer)
-
-
Method Details
-
readUTF
- Specified by:
readUTFin interfaceDataInput- Throws:
IOException
-
available
public int available()- Overrides:
availablein classInputStream
-
mark
public void mark(int readlimit) - Overrides:
markin classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
reset
- Overrides:
resetin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
readBoolean
- Specified by:
readBooleanin interfaceDataInput- Throws:
IOException
-
readByte
- Specified by:
readBytein interfaceDataInput- Throws:
IOException
-
readChar
public char readChar() -
readDouble
public double readDouble()- Specified by:
readDoublein interfaceDataInput
-
readFloat
- Specified by:
readFloatin interfaceDataInput- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceDataInput- Throws:
IOException
-
readInt
- Specified by:
readIntin interfaceDataInput- Throws:
IOException
-
readLine
-
readLong
- Specified by:
readLongin interfaceDataInput- Throws:
IOException
-
readShort
- Specified by:
readShortin interfaceDataInput- Throws:
IOException
-
readUnsignedByte
public int readUnsignedByte()- Specified by:
readUnsignedBytein interfaceDataInput
-
readUnsignedShort
public int readUnsignedShort()- Specified by:
readUnsignedShortin interfaceDataInput
-
skipBytes
public int skipBytes(int n)
-