/** * Writes a bytes array as a typed bytes sequence. * * @param bytes * the bytes array to be written * @throws IOException */ public void writeBytes(byte[] bytes) throws IOException { writeBytes(bytes, Type.BYTES.code); }
public void writeBytes(BytesWritable bw) throws IOException { byte[] bytes = Arrays.copyOfRange(bw.getBytes(), 0, bw.getLength()); out.writeBytes(bytes); }
public void writeWritable(Writable w) throws IOException { DataOutputStream dos = null; try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); dos = new DataOutputStream(baos); WritableUtils.writeString(dos, w.getClass().getName()); w.write(dos); out.writeBytes(baos.toByteArray(), Type.WRITABLE.code); dos.close(); dos = null; } finally { IOUtils.closeStream(dos); } }
/** * Writes a bytes array as a typed bytes sequence. * * @param bytes * the bytes array to be written * @throws IOException */ public void writeBytes(byte[] bytes) throws IOException { writeBytes(bytes, Type.BYTES.code); }
/** * Writes a bytes array as a typed bytes sequence. * * @param bytes * the bytes array to be written * @throws IOException */ public void writeBytes(byte[] bytes) throws IOException { writeBytes(bytes, Type.BYTES.code); }
/** * Writes a bytes array as a typed bytes sequence. * * @param bytes * the bytes array to be written * @throws IOException */ public void writeBytes(byte[] bytes) throws IOException { writeBytes(bytes, Type.BYTES.code); }
/** * Writes a bytes array as a typed bytes sequence. * * @param bytes * the bytes array to be written * @throws IOException */ public void writeBytes(byte[] bytes) throws IOException { writeBytes(bytes, Type.BYTES.code); }
public void writeBytes(BytesWritable bw) throws IOException { byte[] bytes = Arrays.copyOfRange(bw.getBytes(), 0, bw.getLength()); out.writeBytes(bytes); }
public void writeBytes(BytesWritable bw) throws IOException { byte[] bytes = Arrays.copyOfRange(bw.getBytes(), 0, bw.getLength()); out.writeBytes(bytes); }
public void writeBytes(BytesWritable bw) throws IOException { byte[] bytes = Arrays.copyOfRange(bw.getBytes(), 0, bw.getLength()); out.writeBytes(bytes); }
public void writeBuffer(Buffer buf, String tag) throws IOException { out.writeBytes(buf.get()); }
public void writeBuffer(Buffer buf, String tag) throws IOException { out.writeBytes(buf.get()); }
public void writeWritable(Writable w) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(baos); WritableUtils.writeString(dos, w.getClass().getName()); w.write(dos); dos.close(); out.writeBytes(baos.toByteArray(), Type.WRITABLE.code); }
public void writeWritable(Writable w) throws IOException { DataOutputStream dos = null; try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); dos = new DataOutputStream(baos); WritableUtils.writeString(dos, w.getClass().getName()); w.write(dos); out.writeBytes(baos.toByteArray(), Type.WRITABLE.code); dos.close(); dos = null; } finally { IOUtils.closeStream(dos); } }
public void writeWritable(Writable w) throws IOException { DataOutputStream dos = null; try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); dos = new DataOutputStream(baos); WritableUtils.writeString(dos, w.getClass().getName()); w.write(dos); out.writeBytes(baos.toByteArray(), Type.WRITABLE.code); dos.close(); dos = null; } finally { IOUtils.closeStream(dos); } }
public void writeWritable(Writable w) throws IOException { DataOutputStream dos = null; try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); dos = new DataOutputStream(baos); WritableUtils.writeString(dos, w.getClass().getName()); w.write(dos); out.writeBytes(baos.toByteArray(), Type.WRITABLE.code); dos.close(); dos = null; } finally { IOUtils.closeStream(dos); } }
public void writeBytes(BytesWritable bw) throws IOException { byte[] bytes = Arrays.copyOfRange(bw.get(), 0, bw.getSize()); out.writeBytes(bytes); }
writeBytes(((Buffer) obj).get()); } else if (obj instanceof Byte) { writeByte((Byte) obj);
writeBytes(((Buffer) obj).get()); } else if (obj instanceof Byte) { writeByte((Byte) obj);