transfer(new ByteArrayInputStream(data), out);
Writes a given bytes to a stream.
ByteArrayInputStream in = new ByteArrayInputStream(data); byte[] buffer = new byte[1024]; for (int n; (n = in.read(buffer)) > 0;) { out.write(buffer, 0, n);
byte[] b = new byte[4]; for (int word : data) { b[0] = (byte) ((word >>> 24) & 0xFF); b[1] = (byte) ((word >>> 16) & 0xFF); b[2] = (byte) ((word >>> 8) & 0xFF); b[3] = (byte) ((word >>> 0) & 0xFF); out.write(b);
os.write(toBytes(b.length));
if (b.length > 0) {
os.write(b);
os.flush();
writeVarInt(out, data.length); out.write(data);
try { try (ObjectOutputStream out = new ObjectOutputStream(output)) { out.writeObject(value); } catch (IOException e) { throw new RuntimeException(e);
assert outputStream != null; try { outputStream.write(data); } finally { outputStream.close();
try { os.write(bytes); return true; } catch (IOException e) { if (printStackTraceOnError) { e.printStackTrace(); return false; ...