System.arraycopy(data, offset, decodedChars, decodedIndex, copyCount);
System.arraycopy(decodedChars, decodedIndex, data, offset, copyCount);
    private int getBytes(byte[] data, int offset, int length) throws IOException {        int readCharacters = 0;        while (length > 0) {            // need data?  Try to get some            if (!dataAvailable()) {                // if we can't get this, return a count of how much we did get (which may be -1).                if (!decodeStreamData()) {                    return readCharacters > 0 ? readCharacters : -1;                }            }            // now copy some of the data from the decoded buffer to the target buffer            int copyCount = Math.min(decodedCount, length);            System.arraycopy(data, offset, decodedChars, decodedIndex, copyCount);            decodedIndex += copyCount;            decodedCount -= copyCount;            offset += copyCount;            length -= copyCount;            readCharacters += copyCount;        }        return readCharacters;    }