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