Inflater 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。
[Android.Runtime.Register("java/util/zip/Inflater", DoNotGenerateAcw=true)]
public class Inflater : Java.Lang.Object
[<Android.Runtime.Register("java/util/zip/Inflater", DoNotGenerateAcw=true)>]
type Inflater = class
inherit Object
- 繼承
- 屬性
備註
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 ZLIB 壓縮程式庫最初是 PNG 圖形標準的一部分開發,不受專利保護。 在 java.util.zip 套件描述的規格中會完整描述。
下列程式碼片段示範使用 Deflater
和 Inflater
來壓縮和解壓縮字串。
<blockquote>
try {
// Encode a String into bytes
String inputString = "blahblahblah\u20AC\u20AC";
byte[] input = inputString.getBytes("UTF-8");
// Compress the bytes
byte[] output = new byte[100];
Deflater compresser = new Deflater();
compresser.setInput(input);
compresser.finish();
int compressedDataLength = compresser.deflate(output);
// Decompress the bytes
Inflater decompresser = new Inflater();
decompresser.setInput(output, 0, compressedDataLength);
byte[] result = new byte[100];
int resultLength = decompresser.inflate(result);
decompresser.end();
// Decode the bytes into a String
String outputString = new String(result, 0, resultLength, "UTF-8");
} catch(java.io.UnsupportedEncodingException ex) {
// handle
} catch (java.util.zip.DataFormatException ex) {
// handle
}
</blockquote>
的 java.util.zip.Inflater
JAVA 檔。
此頁面的部分是根據 原始碼專案所建立和共用的工作進行修改,並根據中所述的詞彙使用。
建構函式
Inflater() |
建立新的解壓縮程式。 |
Inflater(Boolean) |
建立新的解壓縮程式。 |
Inflater(IntPtr, JniHandleOwnership) |
建立 JNI 物件的 Managed 標記法時所使用的建構函式;由執行時間呼叫。 |
屬性
Adler |
傳回未壓縮資料的 ADLER-32 值。 |
BytesRead |
傳回目前為止壓縮位元組輸入的總數。 |
BytesWritten |
傳回到目前為止未壓縮位元組輸出的總數。 |
Class |
傳回這個 |
Handle |
基礎 Android 實例的控制碼。 (繼承來源 Object) |
JniIdentityHashCode |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
JniPeerMembers |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 |
PeerReference |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
Remaining |
傳回輸入緩衝區中剩餘的位元組總數。 |
ThresholdClass |
此 API 支援 Mono for Android 基礎結構,並不適合直接從您的程式碼使用。 |
ThresholdType |
此 API 支援 Mono for Android 基礎結構,並不適合直接從您的程式碼使用。 |
TotalIn |
傳回目前為止壓縮位元組輸入的總數。 |
TotalOut |
傳回到目前為止未壓縮位元組輸出的總數。 |
方法
Clone() |
建立並傳回這個 物件的複本。 (繼承來源 Object) |
Dispose() |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
Dispose(Boolean) |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
End() |
關閉解壓縮程式,並捨棄任何未處理的輸入。 |
Equals(Object) |
指出其他物件是否「等於」這個物件。 (繼承來源 Object) |
Finished() |
如果已到達壓縮資料流程的結尾,則傳回 true。 |
GetHashCode() |
傳回此物件的雜湊碼值。 (繼承來源 Object) |
Inflate(Byte[]) |
將位元組解壓縮到指定的緩衝區。 |
Inflate(Byte[], Int32, Int32) |
將位元組解壓縮到指定的緩衝區。 |
InflateAsync(Byte[]) |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 |
InflateAsync(Byte[], Int32, Int32) |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 |
JavaFinalize() |
當垃圾收集判斷物件沒有其他參考時,由物件上的垃圾收集行程呼叫。 (繼承來源 Object) |
NeedsDictionary() |
如果解壓縮需要預設字典,則會傳回 true。 |
NeedsInput() |
如果沒有資料保留在輸入緩衝區中,則傳回 true。 |
Notify() |
喚醒正在等候此物件的監視器的單一線程。 (繼承來源 Object) |
NotifyAll() |
喚醒正在等候此物件監視器的所有線程。 (繼承來源 Object) |
Reset() |
重設擴充器,以便處理一組新的輸入資料。 |
SetDictionary(Byte[]) |
將預設字典設定為指定的位元組陣列。 |
SetDictionary(Byte[], Int32, Int32) |
將預設字典設定為指定的位元組陣列。 |
SetHandle(IntPtr, JniHandleOwnership) |
設定 Handle 屬性。 (繼承來源 Object) |
SetInput(Byte[]) |
設定解壓縮的輸入資料。 |
SetInput(Byte[], Int32, Int32) |
設定解壓縮的輸入資料。 |
ToArray<T>() |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
ToString() |
傳回物件的字串表示。 (繼承來源 Object) |
UnregisterFromRuntime() |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
Wait() |
讓目前的執行緒等到喚醒為止,通常是藉由 < em > notified < /em > 或 < em > interrupted < /em > 來喚醒。 (繼承來源 Object) |
Wait(Int64) |
讓目前的執行緒等到喚醒為止,通常是 < 透過 em > notified < /em 或 em > interrupted < /em >> ,或 < 直到經過一定數量的即時為止。 (繼承來源 Object) |
Wait(Int64, Int32) |
讓目前的執行緒等到喚醒為止,通常是 < 透過 em > notified < /em 或 em > interrupted < /em >> ,或 < 直到經過一定數量的即時為止。 (繼承來源 Object) |
明確介面實作
IJavaPeerable.Disposed() |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
IJavaPeerable.DisposeUnlessReferenced() |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
IJavaPeerable.Finalized() |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
IJavaPeerable.JniManagedPeerState |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 (繼承來源 Object) |
擴充方法
JavaCast<TResult>(IJavaObject) |
執行 Android 執行時間檢查的類型轉換。 |
JavaCast<TResult>(IJavaObject) |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 |
GetJniTypeName(IJavaPeerable) |
這個類別支援使用熱門的 ZLIB 壓縮程式庫進行一般用途解壓縮。 |