ByteBufferUtil

public class ByteBufferUtil
extends Object

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


Ringkasan

Konstruktor publik

ByteBufferUtil()

Metode publik

static boolean cleanBuffer(ByteBuffer buffer)

Gunakan dengan hati-hati.

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

Konstruktor publik

ByteBufferUtil

public ByteBufferUtil ()

Metode publik

cleanBuffer

public static boolean cleanBuffer (ByteBuffer buffer)

Gunakan dengan hati-hati. Dalam sebagian besar kasus, membiarkan tugas ke GC sudah cukup.

Parameter
buffer ByteBuffer

Hasil
boolean

getString

public static String getString (ByteBuffer buf, 
                int len)

Parameter
buf ByteBuffer

len int

Hasil
String

mapFile

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

Parameter
f File

offset long

byteOrder ByteOrder

Hasil
ByteBuffer

putString

public static void putString (ByteBuffer buf, 
                String str)

Parameter
buf ByteBuffer

str String