Code example for Charset

Methods: decode

        this.charset = charset;
    protected void eol(byte[] b, int len) throws IOException {
        String line = charset.decode(ByteBuffer.wrap(b, 0, len)).toString();
        // trim off CR/LF from the end 
        line = trimEOL(line);
        // TODO: 
        // we need more support for conveniently putting annotations in the middle of the line, not just at the beginning 
        // we also need the ability for an extension point to have notes hook into the processing 
        Matcher m = MavenMojoNote.PATTERN.matcher(line);
        if (m.matches())
            new MavenMojoNote().encodeTo(out);
        m = Maven3MojoNote.PATTERN.matcher(line);
        if (m.matches())
            new Maven3MojoNote().encodeTo(out);