Package org.apache.gora.accumulo.util

Examples of org.apache.gora.accumulo.util.FixedByteArrayOutputStream


  }
 
  public byte[] encodeShort(short s, byte ret[]) {
    try {
      @SuppressWarnings("resource")
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeShort(s);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here


  }
 
  public byte[] encodeInt(int i, byte ret[]) {
    try {
      @SuppressWarnings("resource")
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeInt(i);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here

  }
 
  public byte[] encodeLong(long l, byte ret[]) {
    try {
      @SuppressWarnings("resource")
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeLong(l);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here

 
  public byte[] encodeDouble(double d, byte[] ret) {
    try {
      long l = Double.doubleToRawLongBits(d);
      @SuppressWarnings("resource")
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeLong(l);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here

 
  public byte[] encodeFloat(float f, byte[] ret) {
    try {
      int i = Float.floatToRawIntBits(f);
      @SuppressWarnings("resource")
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeInt(i);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here

  }
 
  public byte[] encodeBoolean(boolean b, byte[] ret) {
    try {
      @SuppressWarnings("resource")
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeBoolean(b);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here

    return encodeShort(s, new byte[2]);
  }
 
  public byte[] encodeShort(short s, byte ret[]) {
    try {
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeShort(s);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here

    return encodeInt(i, new byte[4]);
  }
 
  public byte[] encodeInt(int i, byte ret[]) {
    try {
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeInt(i);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here

    return encodeLong(l, new byte[8]);
  }
 
  public byte[] encodeLong(long l, byte ret[]) {
    try {
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeLong(l);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here

  }
 
  public byte[] encodeDouble(double d, byte[] ret) {
    try {
      long l = Double.doubleToRawLongBits(d);
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
      dos.writeLong(l);
      return ret;
    } catch (IOException ioe) {
      throw new RuntimeException(ioe);
    }
View Full Code Here

TOP

Related Classes of org.apache.gora.accumulo.util.FixedByteArrayOutputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.