class Base64 extends AnyRef
- Alphabetic
- By Inheritance
- Base64
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Base64(alphabet: String)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val CA: Array[Char]
- val IA: Array[Int]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
def
decode(sArr: Array[Char]): Array[Byte]
Decodes a BASE64 encoded char array.
Decodes a BASE64 encoded char array. All illegal characters will be ignored and can handle both arrays with and without line separators.
- sArr
The source array.
nullor length 0 will return an empty array.- returns
The decoded array of bytes. May be of length 0. Will be
nullif the legal characters (including '=') isn't divideable by 4. (I.e. definitely corrupted).
-
def
decodeFast(sArr: Array[Char]): Array[Byte]
Decodes a BASE64 encoded char array that is known to be resonably well formatted.
Decodes a BASE64 encoded char array that is known to be resonably well formatted. The method is about twice as fast as
#decode(char[]). The preconditions are:
+ The array must have a line length of 76 chars OR no line separators at all (one line).
+ Line separator must be "\r\n", as specified in RFC 2045 + The array must not contain illegal characters within the encoded string
+ The array CAN have illegal characters at the beginning and end, those will be dealt with appropriately.
- sArr
The source array. Length 0 will return an empty array.
nullwill throw an exception.- returns
The decoded array of bytes. May be of length 0.
-
def
encodeToChar(sArr: Array[Byte], lineSep: Boolean): Array[Char]
Encodes a raw byte array into a BASE64
char[]representation i accordance with RFC 2045.Encodes a raw byte array into a BASE64
char[]representation i accordance with RFC 2045.- sArr
The bytes to convert. If
nullor length 0 an empty array will be returned.- lineSep
Optional "\r\n" after 76 characters, unless end of file.
No line separator will be in breach of RFC 2045 which specifies max 76 per line but will be a little faster.- returns
A BASE64 encoded array. Never
null.
-
def
encodeToString(sArr: Array[Byte], lineSep: Boolean): String
Encodes a raw byte array into a BASE64
Stringrepresentation in accordance with RFC 2045.Encodes a raw byte array into a BASE64
Stringrepresentation in accordance with RFC 2045.- sArr
The bytes to convert. If
nullor length 0 an empty array will be returned.- lineSep
Optional "\r\n" after 76 characters, unless end of file.
No line separator will be in breach of RFC 2045 which specifies max 76 per line but will be a little faster.- returns
A BASE64 encoded array. Never
null.
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val fillChar: Char
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def getAlphabet: Array[Char]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()