ByteBufferUtil

public class ByteBufferUtil
extends Object

java.lang.Object
   ↳ com.android.ddmlib.ByteBufferUtil


Summary

Public constructors

ByteBufferUtil()

Public methods

static boolean cleanBuffer(ByteBuffer buffer)

Please use with care.

static String getString(ByteBuffer buf, int len)
static ByteBuffer mapFile(File f, long offset, ByteOrder byteOrder)
static void putString(ByteBuffer buf, String str)

Public constructors

ByteBufferUtil

public ByteBufferUtil ()

Public methods

cleanBuffer

public static boolean cleanBuffer (ByteBuffer buffer)

Please use with care. In most cases leaving the job to the GC is enough.

Parameters
buffer ByteBuffer

Returns
boolean

getString

public static String getString (ByteBuffer buf, 
                int len)

Parameters
buf ByteBuffer

len int

Returns
String

mapFile

public static ByteBuffer mapFile (File f, 
                long offset, 
                ByteOrder byteOrder)

Parameters
f File

offset long

byteOrder ByteOrder

Returns
ByteBuffer

putString

public static void putString (ByteBuffer buf, 
                String str)

Parameters
buf ByteBuffer

str String