Package org.apache.mina.common

Examples of org.apache.mina.common.ByteBuffer.capacity()


  public CacheableImpl(Object obj) {
    ByteBuffer tmp = ByteBuffer.allocate(1024, true);
    tmp.setAutoExpand(true);
    tmp.putObject(obj);
    bytes = new byte[tmp.capacity()];
    tmp.get(bytes);
    cached = true;
    tmp.release();
    tmp = null;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.