Java Utililty Methods OutputStream Write Int

List of utility methods to do OutputStream Write Int

Description

The list of methods to do OutputStream Write Int are organized into topic(s).

Method

voidwriteInt(final int v, final OutputStream out)
write Int
out.write((v >>> 24) & 0xFF);
out.write((v >>> 16) & 0xFF);
out.write((v >>> 8) & 0xFF);
out.write((v >>> 0) & 0xFF);
voidwriteInt(final int v, final OutputStream out)
write Int
out.write((v >>> 24) & 0xFF);
out.write((v >>> 16) & 0xFF);
out.write((v >>> 8) & 0xFF);
out.write((v >>> 0) & 0xFF);
voidwriteInt(final int value, final OutputStream os)
write Int
os.write((byte) (value & 0xFF));
os.write((byte) (value >> 8 & 0xFF));
os.write((byte) (value >> 16 & 0xFF));
os.write((byte) (value >> 24 & 0xFF));
voidwriteInt(final OutputStream out, final int v)
write Int
out.write((v >>> 24) & 0xFF);
out.write((v >>> 16) & 0xFF);
out.write((v >>> 8) & 0xFF);
out.write((v >>> 0) & 0xFF);
voidwriteInt(final OutputStream out, final int value)
write Int
out.write(value >>> 24);
out.write(value >>> 16);
out.write(value >>> 8);
out.write(value);
voidwriteInt(final OutputStream outputStream, final int integer)
Writes an integer out to an OutputStream.
final byte[] byteArray = convertToBytes(integer);
outputStream.write(byteArray);
return;
voidwriteInt(int data, int length, OutputStream out)
write Int
out.write(getBytes(data, new byte[length]), 0, length);
voidwriteInt(int v, OutputStream stream)
Write the given int in little endian format as 4 bytes
writeByte((byte) (v & 0xFF), stream);
writeByte((byte) ((v >> 8) & 0xFF), stream);
writeByte((byte) ((v >> 16) & 0xFF), stream);
writeByte((byte) ((v >> 24) & 0xFF), stream);
voidwriteInt(int v, OutputStream stream)
Writing int to stream
writeByte((byte) ((v >> 24) & 0xFF), stream);
writeByte((byte) ((v >> 16) & 0xFF), stream);
writeByte((byte) ((v >> 8) & 0xFF), stream);
writeByte((byte) (v & 0xFF), stream);
voidwriteInt(OutputStream buffer, int val)
write Int
new DataOutputStream(buffer).writeInt(Integer.reverseBytes(val));