Package java.io

Examples of java.io.FilterInputStream


                                          ExtensionRegistry extensionRegistry)
                                          throws IOException {
      final int size = CodedInputStream.readRawVarint32(input);

      // A stream which will not read more than |size| bytes.
      InputStream limitedInput = new FilterInputStream(input) {
        int limit = size;

        @Override
        public int available() throws IOException {
          return Math.min(super.available(), limit);
View Full Code Here


    public InputStream getInputStream()
        throws java.io.IOException
    {    
        checkConnection();
        if (!_urlString.endsWith("!/"))
            return new FilterInputStream(super.getInputStream())
            {
                public void close() throws IOException {this.in=IO.getClosedStream();}
            };

        URL url = new URL(_urlString.substring(4,_urlString.length()-2));     
View Full Code Here

          } else {
            filename = "version-forge-nohydra.json";
            mod="-forge-nohydra";
          }

          version_json = new FilterInputStream( Installer.class.getResourceAsStream(filename) ) {
            public int read(byte[] buff) throws IOException {
              int ret = in.read(buff);
              if( ret > 0 ) {
                String s = new String( buff,0, ret, "UTF-8");
                s = s.replace("$FORGE_VERSION", (String)forgeVersion.getSelectedItem());
View Full Code Here

    protected Iterator getResponseHeaders(String name) throws IOException {
        return Collections.EMPTY_LIST.iterator();
    }

    protected InputStream getResponseInputStream() throws IOException {
        return new FilterInputStream(socket.getInputStream()) {

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

    protected Iterator getRequestHeaders(String name) throws IOException {
        return Collections.EMPTY_LIST.iterator();
    }

    protected InputStream getRequestInputStream() throws IOException {
        return new FilterInputStream(socket.getInputStream()) {

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

                InputStream in = rs.getBinaryStream(1);
                /**
                 * return an InputStream wrapper in order to
                 * close the ResultSet when the stream is closed
                 */
                return new FilterInputStream(in) {
                    public void close() throws IOException {
                        super.close();
                        // close ResultSet
                        closeResultSet(rs);
                    }
View Full Code Here

                    fileObject.getName(),
                    new Long(filePointer)
                });
            }
        }
        dis = new DataInputStream(new FilterInputStream(mis)
        {
            @Override
            public int read() throws IOException
            {
                int ret = super.read();
View Full Code Here

            return dis;
        }

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

            return dis;
        }

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

                InputStream in = rs.getBinaryStream(1);
                /**
                 * return an InputStream wrapper in order to
                 * close the ResultSet when the stream is closed
                 */
                return new FilterInputStream(in) {
                    public void close() throws IOException {
                        super.close();
                        // close ResultSet
                        closeResultSet(rs);
                    }
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.