net.obsearch.utils.bytes
Class ByteBufferFactoryConversion

java.lang.Object
  extended by net.obsearch.utils.bytes.ByteConversion
      extended by net.obsearch.utils.bytes.ByteBufferFactoryConversion

public class ByteBufferFactoryConversion
extends ByteConversion

Adds additional utility classes used to manipulate byte arrays.

Author:
amuller

Field Summary
 
Fields inherited from class net.obsearch.utils.bytes.ByteConversion
ORDERING
 
Constructor Summary
ByteBufferFactoryConversion()
           
 
Method Summary
static ByteBuffer createByteBuffer(int bytes, int shorts, int ints, int longs, int floats, int doubles)
           
static int estimateByteBuffer(int bytes, int shorts, int ints, int longs, int floats, int doubles)
          Estimates the number of bytes necessary to contain the given number of to store
 
Methods inherited from class net.obsearch.utils.bytes.ByteConversion
byteBufferToByte, byteBufferToDouble, byteBufferToFloat, byteBufferToInt, byteBufferToLong, byteBufferToShort, bytesToByte, bytesToDouble, bytesToFloat, bytesToInt, bytesToLong, bytesToShort, byteToByteBuffer, byteToBytes, createByteBuffer, createByteBuffer, doubleToByteBuffer, doubleToBytes, floatToByteBuffer, floatToBytes, intToByteBuffer, intToBytes, longToByteBuffer, longToBytes, shortToByteBuffer, shortToBytes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferFactoryConversion

public ByteBufferFactoryConversion()
Method Detail

estimateByteBuffer

public static int estimateByteBuffer(int bytes,
                                     int shorts,
                                     int ints,
                                     int longs,
                                     int floats,
                                     int doubles)
Estimates the number of bytes necessary to contain the given number of to store

Parameters:
bytes - # of bytes to store.
shorts - # of shorts to store.
ints - # of ints to store.
longs - # of longs to store.
floats - # of floats to store.
doubles - # of doubles to store.

createByteBuffer

public static ByteBuffer createByteBuffer(int bytes,
                                          int shorts,
                                          int ints,
                                          int longs,
                                          int floats,
                                          int doubles)


Copyright © 2007-2011 Arnoldo Jose Muller Molina. All Rights Reserved.