Java Utililty Methods DataInputStream Read Long

List of utility methods to do DataInputStream Read Long

Description

The list of methods to do DataInputStream Read Long are organized into topic(s).

Method

longreadLong(DataInputStream dataStream)
read Long
return ((long) dataStream.read() | (long) dataStream.read() << 8 | (long) dataStream.read() << 16
        | (long) dataStream.read() << 24 | (long) dataStream.read() << 32 | (long) dataStream.read() << 40
        | (long) dataStream.read() << 48 | (long) dataStream.read() << 56);
longreadLong(DataInputStream inputStream)
Read a long value from an input stream
return inputStream.readLong();
LongreadLong(final DataInputStream in)
read Long
final long read = in.readLong();
return (read == Long.MIN_VALUE ? null : Long.valueOf(read));
LongreadLong(final DataInputStream in)
read Long
if (in.readBoolean()) {
    return null;
return in.readLong();
StringreadLongString(DataInputStream in)
This is a copy of DataInputStream#readUTF(DataInput) with the main difference that the length is not read as a short but as a long.
int utflen = (int) in.readLong();
byte[] bytearr = new byte[utflen];
char[] chararr = new char[utflen];
int c, char2, char3;
int count = 0;
int chararr_count = 0;
in.readFully(bytearr, 0, utflen);
while (count < utflen) {
...