@Test(expected = NoSuchElementException.class) public void getCharsetForIdTooHigh() throws Exception { final Charset charsetForId = encoding.getCharsetForId(TextEncoding.MAX_TEXT_ENCODING_ID + 1); fail(); }
public Charset getCharsetForId(final int id) throws NoSuchElementException { if (!containsKey(id)) { throw new NoSuchElementException("id=" + Integer.toString(id)); } return values[id]; }
TextEncoding implements SimpleIntStringMap { public Charset getCharsetForId(final int id) throws NoSuchElementException { if (!containsKey(id)) { throw new NoSuchElementException("id=" + Integer.toString(id)); } return values[id]; } }
TextEncoding implements SimpleIntStringMap { public Charset getCharsetForId(final int id) throws NoSuchElementException { if (!containsKey(id)) { throw new NoSuchElementException("id=" + Integer.toString(id)); } return values[id]; } private  TextEncoding(); }
TextEncoding implements SimpleIntStringMap { public Charset getCharsetForId(final int id) throws NoSuchElementException { if (!containsKey(id)) { throw new NoSuchElementException("id=" + Integer.toString(id)); } return values[id]; } private  TextEncoding(); static TextEncoding getInstanceOf(); byte getIdForCharset(final Charset charset); Charset getCharsetForId(final int id); @Override boolean containsKey(final int key); @Override String getValue(final int key); }
TextEncoding implements SimpleIntStringMap { public Charset getCharsetForId(final int id) throws NoSuchElementException { if (!containsKey(id)) { throw new NoSuchElementException("id=" + Integer.toString(id)); } return values[id]; } private  TextEncoding(); static TextEncoding getInstanceOf(); byte getIdForCharset(final Charset charset); Charset getCharsetForId(final int id); @Override boolean containsKey(final int key); @Override String getValue(final int key); static final byte MAX_TEXT_ENCODING_ID; static final byte ISO_8859_1; static final byte UTF_16; static final byte UTF_16BE; static final byte UTF_8; static final int TEXT_ENCODING_FIELD_SIZE; }