@Test public void shouldThrowExceptionWhenDecodingByteNonNumericValue() { assertThrows(AsciiNumberFormatException.class, () -> AsciiEncoding.getDigit(0, (byte)'a')); }
public static int getDigit(final int index, final byte value) { if (value < 0x30 || value > 0x39) { throw new AsciiNumberFormatException("'" + ((char)value) + "' is not a valid digit @ " + index); } return value - 0x30; }
AsciiEncoding { public static int getDigit(final int index, final byte value) { if (value < 0x30 || value > 0x39) { throw new AsciiNumberFormatException("'" + ((char)value) + "' is not a valid digit @ " + index); } return value - 0x30; } }
AsciiEncoding { public static int getDigit(final int index, final byte value) { if (value < 0x30 || value > 0x39) { throw new AsciiNumberFormatException("'" + ((char)value) + "' is not a valid digit @ " + index); } return value - 0x30; } private  AsciiEncoding(); }
AsciiEncoding { public static int getDigit(final int index, final byte value) { if (value < 0x30 || value > 0x39) { throw new AsciiNumberFormatException("'" + ((char)value) + "' is not a valid digit @ " + index); } return value - 0x30; } private  AsciiEncoding(); static int endOffset(final int value); static int endOffset(final long value); static int getDigit(final int index, final byte value); static int getDigit(final int index, final char value); static int parseIntAscii(final CharSequence cs, final int index, final int length); static long parseLongAscii(final CharSequence cs, final int index, final int length); }
AsciiEncoding { public static int getDigit(final int index, final byte value) { if (value < 0x30 || value > 0x39) { throw new AsciiNumberFormatException("'" + ((char)value) + "' is not a valid digit @ " + index); } return value - 0x30; } private  AsciiEncoding(); static int endOffset(final int value); static int endOffset(final long value); static int getDigit(final int index, final byte value); static int getDigit(final int index, final char value); static int parseIntAscii(final CharSequence cs, final int index, final int length); static long parseLongAscii(final CharSequence cs, final int index, final int length); static final byte[] MIN_INTEGER_VALUE; static final byte[] MIN_LONG_VALUE; static final byte MINUS_SIGN; static final byte ZERO; }