Package com.impossibl.postgres.utils

Examples of com.impossibl.postgres.utils.NullByteBuf


    // Compute length with encoder
    int length = codec.encoder.length(type, val, conn);

    // Compute length using null channel buffer
    NullByteBuf lengthComputer = new NullByteBuf();
    codec.encoder.encode(type, lengthComputer, val, conn);

    assertEquals(typeName + " computes length incorrectly", lengthComputer.readableBytes(), length);
  }
View Full Code Here


    encode(type, (ByteBuf)buffer, value, context);
  }

  @Override
  public int length(Type type, Object val, Context context) throws IOException {
    NullByteBuf computer = new NullByteBuf();
    encode(type, computer, val, context);
    return computer.readableBytes();
  }
View Full Code Here

TOP

Related Classes of com.impossibl.postgres.utils.NullByteBuf

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.