Home | History | Annotate | Download | only in binary

Lines Matching refs:raw

78      * Converts an array of raw binary data into an array of ascii 0 and 1 characters.
80 * @param raw
81 * the raw binary data to convert
85 public byte[] encode(byte[] raw) {
86 return toAsciiBytes(raw);
90 * Converts an array of raw binary data into an array of ascii 0 and 1 chars.
92 * @param raw
93 * the raw binary data to convert
99 public Object encode(Object raw) throws EncoderException {
100 if (!(raw instanceof byte[])) {
103 return toAsciiChars((byte[]) raw);
111 * @return the raw encoded binary where each bit corresponds to a byte in the byte array argument
137 * @return the raw encoded binary where each bit corresponds to a byte in the byte array argument
149 * @return the raw encoded binary where each bit corresponds to a byte in the byte array argument
169 * @return the raw encoded binary where each bit corresponds to a char in the char array argument
196 * @return the raw encoded binary where each bit corresponds to a byte in the byte array argument
219 * Converts an array of raw binary data into an array of ascii 0 and 1 character bytes - each byte is a truncated
222 * @param raw
223 * the raw binary data to convert
227 public static byte[] toAsciiBytes(byte[] raw) {
228 if (raw == null || raw.length == 0) {
232 byte[] l_ascii = new byte[raw.length << 3];
237 for (int ii = 0, jj = l_ascii.length - 1; ii < raw.length; ii++, jj -= 8) {
239 if ((raw[ii] & BITS[bits]) == 0) {
250 * Converts an array of raw binary data into an array of ascii 0 and 1 characters.
252 * @param raw
253 * the raw binary data to convert
257 public static char[] toAsciiChars(byte[] raw) {
258 if (raw == null || raw.length == 0) {
262 char[] l_ascii = new char[raw.length << 3];
267 for (int ii = 0, jj = l_ascii.length - 1; ii < raw.length; ii++, jj -= 8) {
269 if ((raw[ii] & BITS[bits]) == 0) {
280 * Converts an array of raw binary data into a String of ascii 0 and 1 characters.
282 * @param raw
283 * the raw binary data to convert
287 public static String toAsciiString(byte[] raw) {
288 return new String(toAsciiChars(raw));