Package codechicken.lib.data
Class MCDataInputStream
java.lang.Object
codechicken.lib.data.MCDataInputStream
- All Implemented Interfaces:
MCDataInput
An
MCDataInput implementation, reading
its data from either a InputStream or
DataInput stream.
Created by covers1624 on 4/16/20.
-
Nested Class Summary
Nested classes/interfaces inherited from interface codechicken.lib.data.MCDataInput
MCDataInput.InputStreamWrapper -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReads a boolean from the stream.bytereadByte()Reads a byte from the stream.charreadChar()Reads a char from the stream.doubleReads a double from the stream.floatReads a float from the stream.intreadInt()Reads an int from the stream.longreadLong()Reads a long from the stream.shortReads a Short from the stream.shortReads an Unsigned byte from the stream.intReads an Unsigned short from the stream.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface codechicken.lib.data.MCDataInput
readBooleans, readByteBuf, readByteBuffer, readBytes, readCharBuffer, readChars, readCompoundNBT, readCuboid, readDirection, readDoubleBuffer, readDoubles, readEnum, readFloatBuffer, readFloats, readFluidStack, readIntBuffer, readInts, readItemStack, readLongBuffer, readLongs, readNullableCompoundNBT, readPos, readRegistryId, readRegistryIdDirect, readResourceLocation, readShortBuffer, readShorts, readSignedVarInt, readSignedVarInts, readSignedVarLong, readSignedVarLongs, readString, readTextComponent, readUUID, readVarInt, readVarInts, readVarLong, readVarLongs, readVec3d, readVec3f, readVec3i, readVector, readWithCodec, readWithRegistryCodec, toDataInput, toInputStream
-
Constructor Details
-
MCDataInputStream
-
MCDataInputStream
-
-
Method Details
-
readByte
public byte readByte()Description copied from interface:MCDataInputReads a byte from the stream.- Specified by:
readBytein interfaceMCDataInput- Returns:
- The byte.
-
readUByte
public short readUByte()Description copied from interface:MCDataInputReads an Unsigned byte from the stream.- Specified by:
readUBytein interfaceMCDataInput- Returns:
- The Unsigned byte.
-
readChar
public char readChar()Description copied from interface:MCDataInputReads a char from the stream.- Specified by:
readCharin interfaceMCDataInput- Returns:
- The char.
-
readShort
public short readShort()Description copied from interface:MCDataInputReads a Short from the stream.- Specified by:
readShortin interfaceMCDataInput- Returns:
- The short.
-
readUShort
public int readUShort()Description copied from interface:MCDataInputReads an Unsigned short from the stream.- Specified by:
readUShortin interfaceMCDataInput- Returns:
- The Unsigned short.
-
readInt
public int readInt()Description copied from interface:MCDataInputReads an int from the stream.- Specified by:
readIntin interfaceMCDataInput- Returns:
- The int.
-
readLong
public long readLong()Description copied from interface:MCDataInputReads a long from the stream.- Specified by:
readLongin interfaceMCDataInput- Returns:
- The long.
-
readFloat
public float readFloat()Description copied from interface:MCDataInputReads a float from the stream.- Specified by:
readFloatin interfaceMCDataInput- Returns:
- The float.
-
readDouble
public double readDouble()Description copied from interface:MCDataInputReads a double from the stream.- Specified by:
readDoublein interfaceMCDataInput- Returns:
- The double.
-
readBoolean
public boolean readBoolean()Description copied from interface:MCDataInputReads a boolean from the stream.- Specified by:
readBooleanin interfaceMCDataInput- Returns:
- The boolean.
-