Package org.apache.accumulo.core.client.lexicoder.impl

Examples of org.apache.accumulo.core.client.lexicoder.impl.FixedByteArrayOutputStream


    try {
      byte[] bytes = v.toByteArray();
     
      byte[] ret = new byte[4 + bytes.length];
     
      DataOutputStream dos = new DataOutputStream(new FixedByteArrayOutputStream(ret));
     
      // flip the sign bit
      bytes[0] = (byte) (0x80 ^ bytes[0]);
     
      int len = bytes.length;
View Full Code Here


   */
  @Override
  public byte[] encode(UUID uuid) {
    try {
      byte ret[] = new byte[16];
      DataOutputStream out = new DataOutputStream(new FixedByteArrayOutputStream(ret));
     
      out.writeLong(uuid.getMostSignificantBits() ^ 0x8000000000000000l);
      out.writeLong(uuid.getLeastSignificantBits() ^ 0x8000000000000000l);
     
      out.close();
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.client.lexicoder.impl.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.