Code example for Charset

Methods: decode

0
        this.charset = charset;
    } 
 
    @Override 
    protected void eol(byte[] b, int len) throws IOException {
        String line = charset.decode(ByteBuffer.wrap(b, 0, len)).toString();
        line = trimEOL(line);
 
        if (line.toLowerCase().contains("tests failed")) {
            testFailed = true;
        } 
 
        out.write(b, 0, len);
    } 
 
    @Override 
    public void close() throws IOException { 
        super.close(); 
        out.close();
    } 
Connect your IDE to all the code out there  Get Codota for Java