Package java.io

Examples of java.io.FilterOutputStream


        }
        assertIsFolder(folderPath);

        final MemoryFile file = new MemoryFile();
        entries.put(filePath, file);
        return new FilterOutputStream(new ByteArrayOutputStream()) {
            public void close() throws IOException {
                out.close();
                file.setData(((ByteArrayOutputStream) out).toByteArray());
            }
        };
View Full Code Here


        }
        if (getValue() != null) {
            throw new ImmutableResourceException();
        }
        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        return new FilterOutputStream(baos) {
            public void close() throws IOException {
                super.close();
                StringResource.this.setValue(encoding == null
                    ? baos.toString() : baos.toString(encoding));
            }
View Full Code Here

               return value;
             }
          }));
      this.out = new DataOutputStream
        (new BufferedOutputStream
         (new FilterOutputStream(socket.getOutputStream()) {
             public void write(byte[] buf, int o, int len) throws IOException {
               out.write(buf, o, len);
               if (writingCall != null) {
                 writingCall.touch();
               }
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

        }
        assertIsFolder(folderPath);

        final MemoryFile file = new MemoryFile();
        entries.put(filePath, file);
        return new FilterOutputStream(new ByteArrayOutputStream()) {
            public void close() throws IOException {
                out.close();
                file.setData(((ByteArrayOutputStream) out).toByteArray());
            }
        };
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

        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

                // Get the serializer
                this.serializer = (Serializer) this.selector.select(serializerType);

                // Direct its output to the zip file, filtering calls to close()
                // (we don't want the archive to be closed by the serializer)
                this.serializer.setOutputStream(new FilterOutputStream(this.zipOutput) {
                    public void close() { /*nothing*/
                    }
                });

                // Set it as the current XMLConsumer
View Full Code Here

               return value;
             }
           }));
      this.out = new DataOutputStream
        (new BufferedOutputStream
         (new FilterOutputStream(socket.getOutputStream()) {
             public void write(byte[] buf, int o, int len) throws IOException {
               out.write(buf, o, len);
               if (writingCall != null) {
                 writingCall.touch();
               }
View Full Code Here

            }
            savWriter = logWriter;
            // DERBY-1571: If logWriter is null, stack traces are printed to
            // System.err. Set logWriter to a silent stream to suppress stack
            // traces too.
            FilterOutputStream silentStream = new FilterOutputStream(null) {
                public void write(int b) {
                }

                public void flush() {
                }
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.