List of utility methods to do Byte Array Decode
String | decode(String encoding, byte[] bytes) decode if (encoding == null) { return new String(bytes, "UTF-8"); } else { return new String(bytes, encoding); |
String | decode(String encoding, byte[] data) Decodes a byte array from specified encoding to a unicode String. if (data != null) { if (encoding == null) return new String(data); try { return new String(data, encoding); } catch (UnsupportedEncodingException e) { return null; |
String | decodeBytes(byte[] data, String encoding) Returns the UTF-8 string corresponding to the specified bytes. try { return new String(data, encoding); } catch (UnsupportedEncodingException e) { throw new RuntimeException("Error decoding bytes with " + encoding, e); |
Object | decodeObject(byte[] bytes) decode Object ByteArrayInputStream bais = null; ObjectInputStream ois = null; try { bais = new ByteArrayInputStream(bytes); ois = new ObjectInputStream(bais); return ois.readObject(); } finally { if (ois != null) { ... |
Object | decodeObject(final byte[] bytes) decode Object final ByteArrayInputStream byteStream = new ByteArrayInputStream(bytes); final ObjectInputStream stream = new ObjectInputStream(byteStream); final Object result = stream.readObject(); stream.close(); return result; |
String | decodeRequestParameter(String string, String encoding, byte[] buffer) Given a parameter string and the name of a character encoding, fixes the string. if (encoding == null) return string; if (string == null) return null; int stringLength = string.length(); if ((buffer == null) || (stringLength > buffer.length)) buffer = new byte[stringLength]; string.getBytes(0, stringLength, buffer, 0); ... |
String | decodeString(byte[] bytearr) decode String int utflen = bytearr.length; char[] chararr = new char[utflen]; int c, char2, char3; int count = 0; int chararr_count = 0; while (count < utflen) { c = (int) bytearr[count] & 0xff; if (c > 127) ... |
String | decodeString(byte[] data) Get an instance of TranscoderUtils. String rv = null; try { if (data != null) { rv = new String(data, charset); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); return rv; |
String | decodeString(byte[] data) decode String try { return new String(data, "MACROMAN"); } catch (UnsupportedEncodingException uee) { StringBuffer sb = new StringBuffer(data.length); for (byte b : data) { if (b >= 0) sb.append((char) b); else ... |
String | decodeString(byte[] stringBytes) decode String return decodeString(stringBytes, 0, (stringBytes == null) ? 0 : stringBytes.length);
|