Package java.io

Examples of java.io.FilterInputStream


        trace(fileName, "openFileInputStream");
        InputStream in = super.openFileInputStream(fileName);
        if (!trace) {
            return in;
        }
        return new FilterInputStream(in) {
            public int read(byte[] b) throws IOException {
                trace(fileName, "in.read(b)");
                return super.read(b);
            }
View Full Code Here


          RDFFormat format = Rio.getParserFormatForFileName(entry.getName(), dataFormat);

          try {
            // Prevent parser (Xerces) from closing the input stream
            FilterInputStream wrapper = new FilterInputStream(zipIn) {

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

            return;
        }

        // FtpClient client = fileSystem.getClient();
        mis = fileObject.getInputStream(filePointer);
        dis = new DataInputStream(new FilterInputStream(mis)
        {
            public int read() throws IOException
            {
                int ret = super.read();
                if (ret > -1)
View Full Code Here

                    "vfs.provider.http/get-range.error", new Object[]{
                    fileObject.getName(), new Long(filePointer)});
            }

            mis = data;
            dis = new DataInputStream(new FilterInputStream(mis)
            {
                public int read() throws IOException
                {
                    int ret = super.read();
                    if (ret > -1)
View Full Code Here

    }

    private void addLocationsFromJarFile(String path) throws Exception {
        ZipInputStream zin = new ZipInputStream(ctx.getResourceAsStream(path));
        // Make stream uncloseable by XML parsers
        InputStream uin = new FilterInputStream(zin) {
            public void close() {
            }
        };
        try {
            for(;;) {
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

      this.address = address;
      this.socket = new Socket(address.getAddress(), address.getPort());
      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

  /**
  ** Create an {@InputStream} which transparently attaches an extra header
  ** to the underlying stream.
  */
  public static InputStream augInput(final byte[] hd, InputStream s) throws IOException {
    return new FilterInputStream(s) {
      /** index of next byte to read from hd */
      private int i = 0;

      @Override public int available() throws IOException {
        return (hd.length-i) + in.available();
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

        }
      }
      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

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.