List of utility methods to do Byte Array Decode
byte[] | decode(byte[] b) decode ByteArrayInputStream bais = new ByteArrayInputStream(b); InputStream b64is = MimeUtility.decode(bais, "base64"); byte[] tmp = new byte[b.length]; int n = b64is.read(tmp); byte[] res = new byte[n]; System.arraycopy(tmp, 0, res, 0, n); return res; |
String | decode(byte[] bytes) decode try { return new String(bytes, "UTF-8"); } catch (UnsupportedEncodingException e) { return new String(bytes); |
T | decode(byte[] bytes) decode if (bytes == null) { return null; T t = null; Exception thrown = null; try { ObjectInputStream oin = new ObjectInputStream(new ByteArrayInputStream(bytes)); t = (T) oin.readObject(); ... |
byte[] | decode(byte[] bytes) Decodes the specified bytes. ByteArrayInputStream in = new ByteArrayInputStream(bytes); ByteArrayOutputStream out = new ByteArrayOutputStream(); decode(in, out); return out.toByteArray(); |
InputStream | decode(byte[] msgToDecode) DEFLATE decoding ByteArrayInputStream bais = new ByteArrayInputStream(msgToDecode); return new InflaterInputStream(bais, new Inflater(true)); |
byte[] | decode(byte[] source) Low-level access to decoding ASCII characters in the form of a byte array. byte[] decoded = null; decoded = decode(source, 0, source.length, NO_OPTIONS); return decoded; |
byte[] | decode(byte[] source, int off, int len) Very low-level access to decoding ASCII characters in the form of a byte array. int len34 = len * 3 / 4; byte[] outBuff = new byte[len34]; int outBuffPosn = 0; byte[] b4 = new byte[4]; int b4Posn = 0; int i = 0; byte sbiCrop = 0; byte sbiDecode = 0; ... |
String | decode(byte[] src, String charset) decode return decode(src, 0, src.length, charset);
|
CompositeData | decode(Byte[] wrap) decode if (null == wrap) return null; byte[] prim = new byte[wrap.length]; for (int i = 0; i < wrap.length; i++) { prim[i] = wrap[i]; ByteArrayInputStream inBytes = new ByteArrayInputStream(prim); ObjectInputStream inObject; ... |
byte[] | decode(final byte[] source, final int off, final int len) Very low-level access to decoding ASCII characters in the form of a byte array. int len34 = len * 3 / 4; byte[] outBuff = new byte[len34]; int outBuffPosn = 0; byte[] b4 = new byte[4]; int b4Posn = 0; int i = 0; byte sbiCrop = 0; byte sbiDecode = 0; ... |