Java Utililty Methods ByteArrayOutputStream Write Int

List of utility methods to do ByteArrayOutputStream Write Int

Description

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

Method

voidwriteInt(ByteArrayOutputStream b, int v)
write Int
b.write((v >>> 24) & 0xFF);
b.write((v >>> 16) & 0xFF);
b.write((v >>> 8) & 0xFF);
b.write(v & 0xFF);
voidwriteInt(ByteArrayOutputStream baos, int i)
write Int
for (int j = 0; j < 4; j++) {
    int shift = 24 - j * 8;
    baos.write((byte) (i >>> shift));
voidwriteInt(ByteArrayOutputStream out, int val)
write Int
out.write((byte) (val & 0xff));
out.write((byte) ((val >> 8) & 0xff));
out.write((byte) ((val >> 16) & 0xff));
out.write((byte) ((val >> 24) & 0xff));