Package java.io

Examples of java.io.FilterOutputStream


      conn.setRequestMethod("POST");
      conn.setDoOutput(true);
      conn.setRequestProperty("Content-Type", "application/mercurial-0.1");
      conn.setRequestProperty("Content-Length", String.valueOf(outputLen));
      conn.connect();
      return new FilterOutputStream(conn.getOutputStream()) {
        public void close() throws IOException {
          super.close();
          if (debug) {
            dumpResponseHeader(u);
          }
View Full Code Here


    // need a quiet ping so temporarily disable the logwriter
    PrintWriter 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() { }
        public void close() { }
      };
    setLogWriter(new PrintWriter(silentStream));
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

            }

            this.currentPath = pkgName + fileName;
            this.currentBaos = new ByteArrayOutputStream();

            return new FilterOutputStream( this.currentBaos ) {
                public void close() {
                    // don't let this stream close
                }
            };
        }
View Full Code Here

        this.encoding = encoding;

        // Intercept flush() downcalls from the writer; our caller
        // will call PGStream.flush() as needed.
        OutputStream interceptor = new FilterOutputStream(pg_output) {
                                       public void flush() throws IOException {
                                       }
                                       public void close() throws IOException {
                                           super.flush();
                                       }
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

    // need a quiet ping so temporarily disable the logwriter
    PrintWriter 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() { }
        public void close() { }
      };
    setLogWriter(new PrintWriter(silentStream));
View Full Code Here

        while (headersEnum.hasMoreElements()) {
            headersList.add(headersEnum.nextElement().getName().toLowerCase());
        }
        String[] headers = 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 close() throws IOException {
                    super.close();

                    PreparedStatement stmt = null;
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

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.