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)

请谨慎使用。在大多数情况下,将作业留给垃圾收集器就足够了。

参数
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