ByteBufferUtil

public class ByteBufferUtil
extends Object

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


摘要

公用建構函式

ByteBufferUtil()

公用方法

static boolean cleanBuffer(ByteBuffer buffer)

請謹慎使用。

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

公用建構函式

ByteBufferUtil

public ByteBufferUtil ()

公用方法

cleanBuffer

public static boolean cleanBuffer (ByteBuffer buffer)

請謹慎使用。在大多數情況下,將工作交給 GC 即可。

參數
buffer ByteBuffer

傳回
boolean

getString

public static String getString (ByteBuffer buf, 
                int len)

參數
buf ByteBuffer

len int

傳回
String

mapFile

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

參數
f File

offset long

byteOrder ByteOrder

傳回
ByteBuffer

putString

public static void putString (ByteBuffer buf, 
                String str)

參數
buf ByteBuffer

str String