套件 | mx.utils |
類別 | public class Base64Encoder |
繼承 | Base64Encoder Object |
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
屬性 | 定義自 | ||
---|---|---|---|
constructor : Object
類別物件的參照或是特定物件實體的建構函數。 | Object | ||
insertNewLines : Boolean = true
A Boolean flag to control whether the sequence of characters specified
for Base64Encoder.newLine are inserted every 76 characters
to wrap the encoded output. | Base64Encoder | ||
newLine : int = 10 [靜態]
The character codepoint to be inserted into the encoded output to
denote a new line if insertNewLines is true. | Base64Encoder |
方法 | 定義自 | ||
---|---|---|---|
Constructor. | Base64Encoder | ||
Encodes the characters of a String in Base64 and adds the result to
an internal buffer. | Base64Encoder | ||
Encodes a ByteArray in Base64 and adds the result to an internal buffer. | Base64Encoder | ||
Encodes the UTF-8 bytes of a String in Base64 and adds the result to an
internal buffer. | Base64Encoder | ||
指出物件是否有已定義的指定屬性。 | Object | ||
指出 Object 類別的實體是否位於指定為參數的物件原型鏈中。 | Object | ||
指出指定的屬性是否存在,以及是否可列舉。 | Object | ||
Clears all buffers and resets the encoder to its initial state. | Base64Encoder | ||
為迴圈作業設定動態屬性的可用性。 | Object | ||
傳回代表此物件的字串,根據地區特定慣例進行格式化。 | Object | ||
Returns the current buffer as a Base64 encoded String. | Base64Encoder | ||
會傳回指定之物件的基本值。 | Object |
常數 | 定義自 | ||
---|---|---|---|
CHARSET_UTF_8 : String = "UTF-8" [靜態]
Constant definition for the string "UTF-8". | Base64Encoder |
insertNewLines | 屬性 |
public var insertNewLines:Boolean = true
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
A Boolean flag to control whether the sequence of characters specified
for Base64Encoder.newLine
are inserted every 76 characters
to wrap the encoded output.
The default is true.
newLine | 屬性 |
public static var newLine:int = 10
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
The character codepoint to be inserted into the encoded output to
denote a new line if insertNewLines
is true.
The default is 10
to represent the line feed \n
.
Base64Encoder | () | 建構函式 |
public function Base64Encoder()
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Constructor.
encode | () | 方法 |
public function encode(data:String, offset:uint = 0, length:uint = 0):void
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Encodes the characters of a String in Base64 and adds the result to an internal buffer. Strings must be in ASCII format.
Subsequent calls to this method add on to the
internal buffer. After all data have been encoded, call
toString()
to obtain a Base64 encoded String.
參數
data:String — The String to encode.
| |
offset:uint (default = 0 ) — The character position from which to start encoding.
| |
length:uint (default = 0 ) — The number of characters to encode from the offset.
|
encodeBytes | () | 方法 |
public function encodeBytes(data:ByteArray, offset:uint = 0, length:uint = 0):void
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Encodes a ByteArray in Base64 and adds the result to an internal buffer.
Subsequent calls to this method add on to the internal buffer. After all
data have been encoded, call toString()
to obtain a
Base64 encoded String.
參數
data:ByteArray — The ByteArray to encode.
| |
offset:uint (default = 0 ) — The index from which to start encoding.
| |
length:uint (default = 0 ) — The number of bytes to encode from the offset.
|
encodeUTFBytes | () | 方法 |
public function encodeUTFBytes(data:String):void
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Encodes the UTF-8 bytes of a String in Base64 and adds the result to an
internal buffer. The UTF-8 information does not contain a length prefix.
Subsequent calls to this method add on to the internal buffer. After all
data have been encoded, call toString()
to obtain a Base64
encoded String.
參數
data:String — The String to encode.
|
reset | () | 方法 |
public function reset():void
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Clears all buffers and resets the encoder to its initial state.
toString | () | 方法 |
CHARSET_UTF_8 | 常數 |
public static const CHARSET_UTF_8:String = "UTF-8"
語言版本: | ActionScript 3.0 |
產品版本: | Flex 3 |
執行階段版本: | Flash Player 9, AIR 1.1 |
Constant definition for the string "UTF-8".
Tue Jun 12 2018, 03:47 PM Z