/** * 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @return object which will write the Base64 encoding of the byte array * @since 1.0 */ public static Writable encodeBase64(Byte[] data) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), false); }
/** * Produces 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. * * @param data byte array to be encoded * @return object which will write the hex encoding of the byte array * @see Integer#toHexString(int) */ public static Writable encodeHex(final Byte[] data) { return encodeHex(DefaultTypeTransformation.convertToByteArray(data)); }
/** * 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @param chunked whether or not the Base64 encoded data should be MIME chunked * @return object which will write the Base64 encoding of the byte array * @since 1.5.1 */ public static Writable encodeBase64(Byte[] data, final boolean chunked) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), chunked); }
/** * Produce a Writable object which writes the Base64 URL and Filename Safe encoding of the byte array. * Calling toString() on the result returns the encoding as a String. For more * information on Base64 URL and Filename Safe encoding see <code>RFC 4648 - Section 5 * Base 64 Encoding with URL and Filename Safe Alphabet</code>. * * @param data Byte array to be encoded * @param pad whether or not the encoded data should be padded * @return object which will write the Base64 URL and Filename Safe encoding of the byte array * @since 2.5.0 */ public static Writable encodeBase64Url(Byte[] data, boolean pad) { return encodeBase64Url(DefaultTypeTransformation.convertToByteArray(data), pad); }
@Deprecated public static Object convertToPrimitiveArray(Object a, Class type) { if (type == Byte.TYPE) { return convertToByteArray(a); } if (type == Boolean.TYPE) { return convertToBooleanArray(a); } if (type == Short.TYPE) { return convertToShortArray(a); } if (type == Character.TYPE) { return convertToCharArray(a); } if (type == Integer.TYPE) { return convertToIntArray(a); } if (type == Long.TYPE) { return convertToLongArray(a); } if (type == Float.TYPE) { return convertToFloatArray(a); } if (type == Double.TYPE) { return convertToDoubleArray(a); } else { return a; } }
/** * 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @param chunked whether or not the Base64 encoded data should be MIME chunked * @return object which will write the Base64 encoding of the byte array */ public static Writable encodeBase64(Byte[] data, final boolean chunked) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @return object which will write the Base64 encoding of the byte array */ public static Writable encodeBase64(Byte[] data) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), false); }
/** * 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @param chunked whether or not the Base64 encoded data should be MIME chunked * @return object which will write the Base64 encoding of the byte array * @since 1.5.1 */ public static Writable encodeBase64(Byte[] data, final boolean chunked) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @return object which will write the Base64 encoding of the byte array * @since 1.0 */ public static Writable encodeBase64(Byte[] data) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), false); }
/** * 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @return object which will write the Base64 encoding of the byte array * @since 1.0 */ public static Writable encodeBase64(Byte[] data) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), false); }
/** * 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @return object which will write the Base64 encoding of the byte array * @since 1.0 */ public static Writable encodeBase64(Byte[] data) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), false); }
/** * Produces 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. * * @param data byte array to be encoded * @return object which will write the hex encoding of the byte array * @see Integer#toHexString(int) */ public static Writable encodeHex(final Byte[] data) { return encodeHex(DefaultTypeTransformation.convertToByteArray(data)); }
/** * 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @param chunked whether or not the Base64 encoded data should be MIME chunked * @return object which will write the Base64 encoding of the byte array * @since 1.5.1 */ public static Writable encodeBase64(Byte[] data, final boolean chunked) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), 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 <code>RFC 4648</code>. * * @param data Byte array to be encoded * @param chunked whether or not the Base64 encoded data should be MIME chunked * @return object which will write the Base64 encoding of the byte array * @since 1.5.1 */ public static Writable encodeBase64(Byte[] data, final boolean chunked) { return encodeBase64(DefaultTypeTransformation.convertToByteArray(data), chunked); }
public static Object convertToPrimitiveArray(Object a, Class type) { if (type == Byte.TYPE) { return convertToByteArray(a); } if (type == Boolean.TYPE) { return convertToBooleanArray(a); } if (type == Short.TYPE) { return convertToShortArray(a); } if (type == Character.TYPE) { return convertToCharArray(a); } if (type == Integer.TYPE) { return convertToIntArray(a); } if (type == Long.TYPE) { return convertToLongArray(a); } if (type == Float.TYPE) { return convertToFloatArray(a); } if (type == Double.TYPE) { return convertToDoubleArray(a); } else { return a; } }
public static Object convertToPrimitiveArray(Object a, Class type) { if (type == Byte.TYPE) { return convertToByteArray(a); } if (type == Boolean.TYPE) { return convertToBooleanArray(a); } if (type == Short.TYPE) { return convertToShortArray(a); } if (type == Character.TYPE) { return convertToCharArray(a); } if (type == Integer.TYPE) { return convertToIntArray(a); } if (type == Long.TYPE) { return convertToLongArray(a); } if (type == Float.TYPE) { return convertToFloatArray(a); } if (type == Double.TYPE) { return convertToDoubleArray(a); } else { return a; } }
public static Object convertToPrimitiveArray(Object a, Class type) { if (type == Byte.TYPE) { return convertToByteArray(a); } if (type == Boolean.TYPE) { return convertToBooleanArray(a); } if (type == Short.TYPE) { return convertToShortArray(a); } if (type == Character.TYPE) { return convertToCharArray(a); } if (type == Integer.TYPE) { return convertToIntArray(a); } if (type == Long.TYPE) { return convertToLongArray(a); } if (type == Float.TYPE) { return convertToFloatArray(a); } if (type == Double.TYPE) { return convertToDoubleArray(a); } else { return a; } }
public static Object convertToPrimitiveArray(Object a, Class type) { if (type == Byte.TYPE) { return convertToByteArray(a); } if (type == Boolean.TYPE) { return convertToBooleanArray(a); } if (type == Short.TYPE) { return convertToShortArray(a); } if (type == Character.TYPE) { return convertToCharArray(a); } if (type == Integer.TYPE) { return convertToIntArray(a); } if (type == Long.TYPE) { return convertToLongArray(a); } if (type == Float.TYPE) { return convertToFloatArray(a); } if (type == Double.TYPE) { return convertToDoubleArray(a); } else { return a; } }