Package org.infinispan.commons.io

Examples of org.infinispan.commons.io.ExposedByteArrayOutputStream.toByteArray()


      ObjectOutputStream oos = new ObjectOutputStream(baos);
      objectToObjectStream(o, oos);
      oos.flush();
      oos.close();
      baos.close();
      byte[] b = baos.toByteArray();
      return new ByteBuffer(b, 0, b.length);
   }

   @Override
   public Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, ClassNotFoundException {
View Full Code Here


      ObjectOutputStream oos = new ObjectOutputStream(baos);
      objectToObjectStream(o, oos);
      oos.flush();
      oos.close();
      baos.close();
      byte[] b = baos.toByteArray();
      return new ByteBufferImpl(b, 0, b.length);
   }

   @Override
   public Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, ClassNotFoundException {
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.