Package org.teavm.classlib.impl.charset

Examples of org.teavm.classlib.impl.charset.ByteBuffer


        inBuffer.rewind(0);
        while (off < inData.length) {
            int bytesRead = stream.read(inData, off, inData.length - off);
            if (bytesRead == -1) {
                streamEof = true;
                inBuffer = new ByteBuffer(inData, 0, inBuffer.position());
                break;
            } else {
                off += bytesRead;
                if (bytesRead == 0) {
                    break;
                }
            }
        }
        inBuffer = new ByteBuffer(inData, 0, off);
        return true;
    }
View Full Code Here


    }

    private void print(char[] s, int begin, int end) {
        CharBuffer src = new CharBuffer(s, begin, end);
        byte[] destBytes = new byte[TMath.max(16, TMath.min(s.length, 1024))];
        ByteBuffer dest = new ByteBuffer(destBytes);
        while (!src.end()) {
            charset.encode(src, dest);
            write(destBytes, 0, dest.position());
            dest.rewind(0);
        }
    }
View Full Code Here

TOP

Related Classes of org.teavm.classlib.impl.charset.ByteBuffer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.