org.infinispan.io
Class ByteBuffer

java.lang.Object
  extended by org.infinispan.io.ByteBuffer

public class ByteBuffer
extends Object

A byte buffer that exposes the internal byte array with minimal copying

Since:
4.0
Author:
(various)

Constructor Summary
ByteBuffer(byte[] buf, int offset, int length)
           
 
Method Summary
 ByteBuffer copy()
           
 byte[] getBuf()
           
 int getLength()
           
 int getOffset()
           
 InputStream getStream()
           
 ByteBuffer toJDKByteBuffer()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ByteBuffer

public ByteBuffer(byte[] buf,
                  int offset,
                  int length)
Method Detail

getBuf

public byte[] getBuf()

getOffset

public int getOffset()

getLength

public int getLength()

copy

public ByteBuffer copy()

toString

public String toString()
Overrides:
toString in class Object

getStream

public InputStream getStream()
Returns:
an input stream for the bytes in the buffer

toJDKByteBuffer

public ByteBuffer toJDKByteBuffer()

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.