src/org/kocakosm/pitaya/charset/ASCII.java
public static String decode(byte[] input, int off, int len)
	{
		CharsetDecoder decoder = Charsets.US_ASCII.newDecoder();
		ByteBuffer buf = ByteBuffer.wrap(input, off, len);
		try {
			CharBuffer out = decoder.decode(buf);
			char[] chars = new char[out.limit()];
			out.get(chars);
			return new String(chars);
		} catch (CharacterCodingException ex) {
			throw new IllegalArgumentException(ex);
		}
	}
public static String decode(byte[] input, int off, int len)
	{
		CharsetDecoder decoder = Charsets.US_ASCII.newDecoder();
		ByteBuffer buf = ByteBuffer.wrap(input, off, len);
		try {
			CharBuffer out = decoder.decode(buf);
			char[] chars = new char[out.limit()];
			out.get(chars);
			return new String(chars);
		} catch (CharacterCodingException ex) {
			throw new IllegalArgumentException(ex);
		}
	}
public static String decode ( byte [ ] input , int off , int len ) { CharsetDecoder decoder = Charsets . US_ASCII . newDecoder ( ) ; ByteBuffer buf = ByteBuffer . wrap ( input , off , len ) ; try { CharBuffer out = decoder . decode ( buf ) ; char [ ] chars = new char [ out . limit ( ) ] ; out . get ( chars ) ; return new String ( chars ) ; } catch ( CharacterCodingException ex ) { throw new IllegalArgumentException ( ex ) ; } }
Decodes {@code len} ASCII encoded bytes from the given input buffer,
starting at {@code off}.

@param input the input buffer.
@param off the starting offset.
@param len the number of bytes to decode.

@return the decoded characters.

@throws NullPointerException if {@code input} is {@code null}.
@throws IndexOutOfBoundsException if {@code off} or {@code len} is
negative or if {@code off + len} is greater than {@code input}'s
length.
@throws IllegalArgumentException if the specified bytes do not
represent valid ASCII encoded characters.
Decodes { @code len } ASCII encoded bytes from the given input buffer starting at { @code off } .