Code example for Charset

Methods: newEncoder

0
    } 
 
    public SessionOutputBufferMock( 
            final Charset charset) {
        this(new ByteArrayOutputStream(), BUFFER_SIZE, BUFFER_SIZE,
                charset != null ? charset.newEncoder() : null);
    } 
 
    public SessionOutputBufferMock(final ByteArrayOutputStream buffer) {
        this(buffer, BUFFER_SIZE, BUFFER_SIZE, null);
    } 
 
    public SessionOutputBufferMock() { 
        this(new ByteArrayOutputStream());
    } 
 
    public byte[] getData() { 
        if (this.buffer != null) {
            return this.buffer.toByteArray();
        } else { 
            return new byte[] {};