Code example for ByteSink

Methods: openStream

0
    } 
 
    @Override 
    public void process(String outputName, ByteSource byteSource,
                        ByteSink byteSink, boolean closeAtFinish) throws IOException {
        process(outputName, byteSource.openStream(), byteSink.openStream(), closeAtFinish);
    } 
 
    @Override 
    public void process(String outputName, InputStream in, OutputStream out, boolean closeAtFinish) throws IOException {
 
        Reader reader = null;
        Writer writer = null;
 
        try { 
            reader = new InputStreamReader(in, charset);
            writer = new OutputStreamWriter(out, charset);
 
            CurrentResourceContext crc = (CurrentResourceContext) CurrentResourceContext.getInstance(FacesContext.getCurrentInstance());