List of utility methods to do ByteArrayOutputStream Write
void | writeUint32BE(ByteArrayOutputStream buffer, long value) write Uint BE buffer.write((byte) ((value >> 24) & 0xff)); buffer.write((byte) ((value >> 16) & 0xff)); buffer.write((byte) ((value >> 8) & 0xff)); buffer.write((byte) (value & 0xff)); |
void | writeUint32LE(ByteArrayOutputStream buffer, long value) write Uint LE buffer.write((byte) (value & 0xff)); buffer.write((byte) ((value >> 8) & 0xff)); buffer.write((byte) ((value >> 16) & 0xff)); buffer.write((byte) ((value >> 24) & 0xff)); |
void | writeUint64BE(ByteArrayOutputStream buffer, long value) write Uint BE buffer.write((byte) ((value >> 56) & 0xff)); buffer.write((byte) ((value >> 48) & 0xff)); buffer.write((byte) ((value >> 40) & 0xff)); buffer.write((byte) ((value >> 32) & 0xff)); buffer.write((byte) ((value >> 24) & 0xff)); buffer.write((byte) ((value >> 16) & 0xff)); buffer.write((byte) ((value >> 8) & 0xff)); buffer.write((byte) (value & 0xff)); ... |
void | writeUint64LE(ByteArrayOutputStream buffer, long value) write Uint LE buffer.write((byte) (value & 0xff)); buffer.write((byte) ((value >> 8) & 0xff)); buffer.write((byte) ((value >> 16) & 0xff)); buffer.write((byte) ((value >> 24) & 0xff)); buffer.write((byte) ((value >> 32) & 0xff)); buffer.write((byte) ((value >> 40) & 0xff)); buffer.write((byte) ((value >> 48) & 0xff)); buffer.write((byte) ((value >> 56) & 0xff)); ... |
void | copyTo(Context context, String fromPath, String toFile) copy To try { if (!new File(toFile).exists()) { new File(toFile).createNewFile(); InputStream fromFileIs = context.getResources().getAssets() .open(fromPath); int length = fromFileIs.available(); byte[] buffer = new byte[length]; ... |
void | writeInt(ByteArrayOutputStream baos, int i) write Int for (int j = 0; j < 4; j++) { int shift = 24 - j * 8; baos.write((byte) (i >>> shift)); |
void | copyStream(ByteArrayOutputStream source, ByteArrayOutputStream target) Copies source stream to target. ByteArrayOutputStream memContentStream = source; if (memContentStream != null) { memContentStream.writeTo(target); memContentStream.flush(); } else { int c; ByteArrayInputStream inStream = new ByteArrayInputStream( source.toByteArray()); ... |