Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Type | Name and description |
---|---|
static byte[] |
decodeBase64(String value) Decode the String from Base64 into a byte array. |
static byte[] |
decodeHex(String value) Decodes a hex string to a byte array. |
static Writable |
encodeBase64(Byte[] data, boolean chunked) Produce a Writable object which writes the Base64 encoding of the byte array. |
static Writable |
encodeBase64(Byte[] data) Produce a Writable object which writes the Base64 encoding of the byte array. |
static Writable |
encodeBase64(byte[] data, boolean chunked) Produce a Writable object which writes the Base64 encoding of the byte array. |
static Writable |
encodeBase64(byte[] data) Produce a Writable object which writes the Base64 encoding of the byte array. |
static Writable |
encodeHex(Byte[] data) Produces a Writable that writes the hex encoding of the Byte[]. |
static Writable |
encodeHex(byte[] data) Produces a Writable that writes the hex encoding of the byte[]. |
Decode the String from Base64 into a byte array.
value
- the string to be decodedDecodes a hex string to a byte array. The hex string can contain either upper case or lower case letters.
value
- string to be decoded Produce a Writable object which writes the Base64 encoding of the byte array.
Calling toString() on the result returns the encoding as a String. For more
information on Base64 encoding and chunking see RFC 4648
.
data
- Byte array to be encodedchunked
- whether or not the Base64 encoded data should be MIME chunked Produce a Writable object which writes the Base64 encoding of the byte array.
Calling toString() on the result returns the encoding as a String. For more
information on Base64 encoding and chunking see RFC 4648
.
data
- Byte array to be encoded Produce a Writable object which writes the Base64 encoding of the byte array.
Calling toString() on the result returns the encoding as a String. For more
information on Base64 encoding and chunking see RFC 4648
.
data
- byte array to be encodedchunked
- whether or not the Base64 encoded data should be MIME chunked Produce a Writable object which writes the Base64 encoding of the byte array.
Calling toString() on the result returns the encoding as a String. For more
information on Base64 encoding and chunking see RFC 4648
.
data
- byte array to be encodedProduces a Writable that writes the hex encoding of the Byte[]. Calling toString() on this Writable returns the hex encoding as a String. The hex encoding includes two characters for each byte and all letters are lower case.
data
- byte array to be encodedProduces a Writable that writes the hex encoding of the byte[]. Calling toString() on this Writable returns the hex encoding as a String. The hex encoding includes two characters for each byte and all letters are lower case.
data
- byte array to be encoded