Home | History | Annotate | Download | only in net

Lines Matching refs:bytes

123      * Encodes an array of bytes into an array of quoted-printable 7-bit characters. Unsafe characters are escaped.
132 * @param bytes
133 * array of bytes to be encoded
134 * @return array of bytes containing quoted-printable data
136 public static final byte[] encodeQuotedPrintable(BitSet printable, byte[] bytes) {
137 if (bytes == null) {
144 for (int i = 0; i < bytes.length; i++) {
145 int b = bytes[i];
159 * Decodes an array quoted-printable characters into an array of original bytes. Escaped characters are converted
167 * @param bytes
169 * @return array of original bytes
173 public static final byte[] decodeQuotedPrintable(byte[] bytes) throws DecoderException {
174 if (bytes == null) {
178 for (int i = 0; i < bytes.length; i++) {
179 int b = bytes[i];
182 int u = Character.digit((char) bytes[++i], 16);
183 int l = Character.digit((char) bytes[++i], 16);
199 * Encodes an array of bytes into an array of quoted-printable 7-bit characters. Unsafe characters are escaped.
206 * @param bytes
207 * array of bytes to be encoded
208 * @return array of bytes containing quoted-printable data
210 public byte[] encode(byte[] bytes) {
211 return encodeQuotedPrintable(PRINTABLE_CHARS, bytes);
215 * Decodes an array of quoted-printable characters into an array of original bytes. Escaped characters are converted
223 * @param bytes
225 * @return array of original bytes
229 public byte[] decode(byte[] bytes) throws DecoderException {
230 return decodeQuotedPrintable(bytes);