Package java.io

Examples of java.io.FilterInputStream


            /**
             * return an InputStream wrapper in order to
             * close the ResultSet when the stream is closed
             */
            return new FilterInputStream(in) {
                public void close() throws IOException {
                    in.close();
                    // now it's safe to close ResultSet
                    closeResultSet(rs);
                }
View Full Code Here


         long bytesRead = ByteStreams.copy(instream, out);
         if (bytesRead >= limit)
            logger.debug("over limit %d/%d: wrote temp file", bytesRead, limit);
         wire(header, out.asByteSource().getInput());
         // we must call FileBackedOutputStream.reset to remove temporary file
         return new FilterInputStream(out.asByteSource().getInput()) {
            @Override
            public void close() throws IOException {
               super.close();
               out.reset();
            }
View Full Code Here

            /**
             * return an InputStream wrapper in order to
             * close the ResultSet when the stream is closed
             */
            return new FilterInputStream(in) {
                public void close() throws IOException {
                    in.close();
                    // now it's safe to close ResultSet
                    closeResultSet(rs);
                }
View Full Code Here

            /**
             * return an InputStream wrapper in order to
             * close the ResultSet when the stream is closed
             */
            return new FilterInputStream(in) {
                public void close() throws IOException {
                    in.close();
                    // now it's safe to close ResultSet
                    closeResultSet(rs);
                }
View Full Code Here

            /**
             * return an InputStream wrapper in order to
             * close the ResultSet when the stream is closed
             */
            return new FilterInputStream(in) {
                public void close() throws IOException {
                    in.close();
                    // now it's safe to close ResultSet
                    closeResultSet(rs);
                }
View Full Code Here

        }
      }
      socket.setSoTimeout(timeout);
      this.in = new DataInputStream
        (new BufferedInputStream
         (new FilterInputStream(socket.getInputStream()) {
             public int read(byte[] buf, int off, int len) throws IOException {
               int value = super.read(buf, off, len);
               if (readingCall != null) {
                 readingCall.touch();
               }
View Full Code Here

                }

                 // return an InputStream wrapper in order to close the ResultSet when the stream is closed
                close = false;
                final ResultSet rs2 = rs;
                return new FilterInputStream(in) {

                    public void close() throws IOException {
                        try {
                            in.close();
                        } finally {
View Full Code Here

            /**
             * return an InputStream wrapper in order to
             * close the ResultSet when the stream is closed
             */
            return new FilterInputStream(in) {
                public void close() throws IOException {
                    in.close();
                    // now it's safe to close ResultSet
                    closeResultSet(rs);
                }
View Full Code Here

            IProject project = localProjects.get(projectID);
            IPath path = Path.fromPortableString(zipEntry.getName());
            // store the archive temporary
            IFile file = project.getFile(path);
            // Archive needs to be stored temporarily to be accessed
            FileUtils.writeFile(new FilterInputStream(zipStream) {
                @Override
                public void close() throws IOException {
                    // prevent the ZipInputStream from being closed
                }
            }, file, lMonitor.newChild(10));
View Full Code Here

                    throw new LocalCancellationException();

                IPath path = Path.fromPortableString(entry.getName());
                IFile file = container.getFile(path);

                writeFile(new FilterInputStream(zip) {
                    @Override
                    public void close() throws IOException {
                        // prevent the ZipInputStream from being closed
                    }
                }, file, monitor.newChild(1));
View Full Code Here

TOP

Related Classes of java.io.FilterInputStream

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.