Converts a single byte to its hex representation. @param c character to be encoded @return encoded value
(final byte c)
| 146 | * @return encoded value |
| 147 | */ |
| 148 | private static int b2h(final byte c) { |
| 149 | if(c < 0 || c >= B2H.length) throw error((char) c); |
| 150 | final int result = B2H[c]; |
| 151 | if(result < 0) throw error((char) c); |
| 152 | return result; |
| 153 | } |
| 154 | |
| 155 | /** |
| 156 | * Throws an illegal argument exception for the specified character. |