Package org.apache.commons.io.output

Examples of org.apache.commons.io.output.ByteArrayOutputStream.writeTo()


        transformer.transform(src, res);
       
        OutputStream out = new java.io.FileOutputStream(
                new File(backupDir, foFile.getName() + ".pdf"));
        try {
            baout.writeTo(out);
        } finally {
            IOUtils.closeQuietly(out);
        }
       
        //Check how many times the resolver was consulted
View Full Code Here


                double scale = imw / UnitConv.mm2pt(imw * 0.025);
                gen.writeText("SC0," + gen.formatDouble4(scale)
                        + ",0,-" + gen.formatDouble4(scale) + ",2;");
                gen.writeText("IR0,100,0,100;");
                gen.writeText("PU;PA0,0;\n");
                baout.writeTo(gen.getOutputStream()); //Buffer is written to output stream
                gen.writeText("\n");

                gen.enterPCLMode(false);
                pcl.restoreGraphicsState();
                painted = true;
View Full Code Here

        if ((baout.size() % 2) > 0) {
            baout.write(0);
        }
        writeCommand("*c" + patternID + "G");
        writeCommand("*c" + baout.size() + "W");
        baout.writeTo(this.out);
        writeCommand("*c4Q"); //temporary pattern
    }

    /**
     * Sets the source transparency mode.
View Full Code Here

        if ((baout.size() % 2) > 0) {
            baout.write(0);
        }
        writeCommand("*c" + patternID + "G");
        writeCommand("*c" + baout.size() + "W");
        baout.writeTo(this.out);
        writeCommand("*c4Q"); //temporary pattern
    }

    /**
     * Sets the source transparency mode.
View Full Code Here

        transformer.transform(src, res);

        OutputStream out = new java.io.FileOutputStream(
                new File(backupDir, foFile.getName() + ".pdf"));
        try {
            baout.writeTo(out);
        } finally {
            IOUtils.closeQuietly(out);
        }

        //Check how many times the resolver was consulted
View Full Code Here

        transformer.transform(src, res);

        OutputStream out = new java.io.FileOutputStream(
                new File(backupDir, foFile.getName() + ".pdf"));
        try {
            baout.writeTo(out);
        } finally {
            IOUtils.closeQuietly(out);
        }

        //Check how many times the resolver was consulted
View Full Code Here

        if ((baout.size() % 2) > 0) {
            baout.write(0);
        }
        writeCommand("*c" + patternID + "G");
        writeCommand("*c" + baout.size() + "W");
        baout.writeTo(this.out);
        writeCommand("*c4Q"); //temporary pattern
    }

    /**
     * Sets the source transparency mode.
View Full Code Here

            double scale = imageDim.getWidth() / UnitConv.mm2pt(imageDim.getWidth() * 0.025);
            gen.writeText("SC0," + gen.formatDouble4(scale)
                    + ",0,-" + gen.formatDouble4(scale) + ",2;");
            gen.writeText("IR0,100,0,100;");
            gen.writeText("PU;PA0,0;\n");
            baout.writeTo(gen.getOutputStream()); //Buffer is written to output stream
            gen.writeText("\n");

            gen.enterPCLMode(false);
            painted = true;
        } catch (UnsupportedOperationException uoe) {
View Full Code Here

        data[9] = colsizes[1];
        data[10] = colsizes[2];
        data[11] = colsizes[3];

        os.write(data);
        baout.writeTo(os);
    }

    /** {@inheritDoc} */
    @Override
    public String toString() {
View Full Code Here

                double scale = imw / UnitConv.mm2pt(imw * 0.025);
                gen.writeText("SC0," + gen.formatDouble4(scale)
                        + ",0,-" + gen.formatDouble4(scale) + ",2;");
                gen.writeText("IR0,100,0,100;");
                gen.writeText("PU;PA0,0;\n");
                baout.writeTo(gen.getOutputStream()); //Buffer is written to output stream
                gen.writeText("\n");

                gen.enterPCLMode(false);
                pcl.restoreGraphicsState();
                painted = true;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.