List of utility methods to do OutputStream Write Int
void | writeInt(OutputStream out, int x) Write an integer (4 bytes). out.write((byte) (x >> 24)); out.write((byte) (x >> 16)); out.write((byte) (x >> 8)); out.write((byte) x); |
void | writeInt(OutputStream out, int x) Writes an integer to the output stream. out.write((x >>> 24) & 0xFF); out.write((x >>> 16) & 0xFF); out.write((x >>> 8) & 0xFF); out.write(x & 0xFF); |
void | writeInt(OutputStream output, int value) Write int, little endian byte[] writeBuffer = new byte[4]; writeBuffer[0] = (byte) (value & 0xFF); writeBuffer[1] = (byte) ((value >> 8) & 0xFF); writeBuffer[2] = (byte) ((value >> 16) & 0xFF); writeBuffer[3] = (byte) ((value >> 24) & 0xFF); output.write(writeBuffer, 0, 4); |
void | writeInt(OutputStream outputStream, int integerToWrite) write Int outputStream.write(intToByteArray(integerToWrite)); |
void | writeInt(OutputStream stream, int value) write Int for (int i = 0; i < 4; ++i) { stream.write(value & MASK); value >>= BITS_IN_BYTE; |