Package org.ajax4jsf.io

Examples of org.ajax4jsf.io.ByteBuffer


    public void handle(byte[] bytes, int length) throws IOException {
        buffer.append(bytes, 0, length);
    }

    public void create() {
        buffer = new ByteBuffer(128);
    }
View Full Code Here


    private byte[] getBufferBytes() {
        byte[] bs = new byte[buffer.getLast().getTotalSize()];

        int pos = 0;
        ByteBuffer currentBuffer = buffer;
        while (currentBuffer != null) {
            System.arraycopy(currentBuffer.getBytes(), 0, bs, pos, currentBuffer.getUsedSize());
            pos += currentBuffer.getUsedSize();
            currentBuffer = currentBuffer.getNext();
        }

        return bs;
    }
View Full Code Here

    public void handle(byte[] bytes, int length) throws IOException {
        buffer.append(bytes, 0, length);
    }

    public void create() throws IOException {
        buffer = new ByteBuffer(256);
    }
View Full Code Here

TOP

Related Classes of org.ajax4jsf.io.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.