自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release 而非 aosp-main 建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
ByteBufferUtil
public
class
ByteBufferUtil
extends Object
| java.lang.Object
|
| ↳ |
com.android.ddmlib.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 即可。
getString
public static String getString (ByteBuffer buf,
int len)
| 參數 |
buf |
ByteBuffer |
len |
int |
mapFile
public static ByteBuffer mapFile (File f,
long offset,
ByteOrder byteOrder)
| 參數 |
f |
File |
offset |
long |
byteOrder |
ByteOrder |
putString
public static void putString (ByteBuffer buf,
String str)
| 參數 |
buf |
ByteBuffer |
str |
String |
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-12-04 (世界標準時間)。
[null,null,["上次更新時間:2025-12-04 (世界標準時間)。"],[],[]]