Package java.io

Examples of java.io.FilterOutputStream


        try {
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);

            return new FilterOutputStream(new FileOutputStream(tmpFile)) {

                public void close() throws IOException {
                    super.close();

                    PreparedStatement stmt = null;
View Full Code Here


        while (headersEnum.hasMoreElements()) {
            headersList.add(((Header) headersEnum.nextElement()).getName().toLowerCase());
        }
        String[] headers = (String[]) headersList.toArray(new String[0]);
        // Skip first 2 bytes
        OutputStream os = new FilterOutputStream(out) {
            private int nb = 0;
            public void write(int b) throws IOException {
                if (++nb > 2) {
                    super.write(b);
                }
View Full Code Here

        try {
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);

            return new FilterOutputStream(new FileOutputStream(tmpFile)) {

                public void write(byte[] bytes, int off, int len) throws IOException {
                    out.write(bytes, off, len);
                }
View Full Code Here

        try {
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);

            return new FilterOutputStream(new FileOutputStream(tmpFile)) {

                public void write(byte[] bytes, int off, int len) throws IOException {
                    out.write(bytes, off, len);
                }
View Full Code Here

    }

    private static void writeBinary(File outputFile, Printable printable) throws IOException {
        OutputStream outputStream = null;
        if(outputFile == null) {
            outputStream = new FilterOutputStream(System.out) {

                @Override
                public void close() throws IOException {
                    flush();
                }
View Full Code Here

    }

    private static void writeAscii(File outputFile, Writable writable) throws IOException {
        Writer writer = null;
        if(outputFile == null) {
            writer = new OutputStreamWriter(new FilterOutputStream(System.out) {

                @Override
                public void close() throws IOException {
                    flush();
                }
View Full Code Here

    protected void addRequestHeader(String name, String value) throws IOException {
    }

    protected OutputStream getRequestOutputStream() throws IOException {
        return new FilterOutputStream(socket.getOutputStream()) {

            @Override
            public void close() throws IOException {
                // don't close the socket
                socket.shutdownOutput();
View Full Code Here

    protected void addResponseHeader(String name, String value) throws IOException {
    }

    protected OutputStream getResponseOutputStream() throws IOException {
        return new FilterOutputStream(socket.getOutputStream()) {

            @Override
            public void close() throws IOException {
                // don't close the socket
                socket.shutdownOutput();
View Full Code Here

        try {
            TransientFileFactory fileFactory = TransientFileFactory.getInstance();
            final File tmpFile = fileFactory.createTransientFile("bin", null, null);

            return new FilterOutputStream(new FileOutputStream(tmpFile)) {

                public void close() throws IOException {
                    super.close();

                    InputStream in = null;
View Full Code Here

        ProfileGeneration profGen = vmArcMgr.getTargetGeneration();

        try {
            /* Save the changed bitmap file */
            FilterOutputStream fos =
                new FilterOutputStream
                (new FileOutputStream
                 (profGen.getBmpInPath(diskId)));
            bmp.writeTo(fos);
            fos.close();

            /* Check whether the bitmap is all zero or not.
               (All zero means the vmdk does not change at all.) */
            profGen.setIsChanged(diskId, bmp.isAllZero() == false);
           
View Full Code Here

TOP

Related Classes of java.io.FilterOutputStream

Copyright © 2018 www.massapicom. 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.