Examples of NullInputStream


Examples of org.apache.commons.io.input.NullInputStream

    /**
     * Test Copying file > 2GB  - see issue# IO-84
     */
    public void testCopy_inputStreamToOutputStream_IO84() throws Exception {
        long size = (long)Integer.MAX_VALUE + (long)1;
        InputStream  in  = new NullInputStream(size);
        OutputStream out = new NullOutputStream();

        // Test copy() method
        assertEquals(-1, IOUtils.copy(in, out));

        // reset the input
        in.close();

        // Test copyLarge() method
        assertEquals("copyLarge()", size, IOUtils.copyLarge(in, out));
    }
View Full Code Here

Examples of org.apache.commons.io.input.NullInputStream

           
            //binary
            if(is != null) {
              rd.setBinary(is, fileLength);
            } else {
              rd.setBinary(new NullInputStream(0),0);
            }

            //properties
            List<Property<?>> properties = document.getProperties();
            String id = StringUtils.EMPTY;
View Full Code Here

Examples of org.apache.commons.io.input.NullInputStream

    AudioInputStream wrapped;
    public boolean stopped;

    public SplitableAudioInputStream(AudioInputStream wrapped) {
        // this is really just to foil the parent. The parent should never be used.
        super(new NullInputStream(0), new AudioFormat(16000.0F, 16, 1, true, true), 0);
        this.wrapped = wrapped;
        this.stopped = false;
    }
View Full Code Here

Examples of org.apache.commons.io.input.NullInputStream

          //binary
          if(fileLength>0 && document.getContentStream()!=null){
            is = document.getContentStream().getStream();
            rd.setBinary(is, fileLength);
          } else {
            rd.setBinary(new NullInputStream(0),0);
          }

          //properties
          List<Property<?>> properties = document.getProperties();
          String id = StringUtils.EMPTY;
View Full Code Here

Examples of org.apache.oodt.commons.io.NullInputStream

    public TestCodec() {}
    public Node encode(Object object, Document doc) { return null; }
    public Object decode(Node node) { return null; }
    public long sizeOf(Object obj) { return 0; }
    public InputStream getInputStream(Object object) {
      return new NullInputStream();
    }
View Full Code Here

Examples of org.apache.tika.io.NullInputStream

    private CountingInputStream stream;

    private SecureContentHandler handler;

    protected void setUp() {
        stream = new CountingInputStream(new NullInputStream(MANY_BYTES));
        handler = new SecureContentHandler(new DefaultHandler(), stream);
    }
View Full Code Here

Examples of org.eclipse.wst.sse.core.internal.encoding.util.NullInputStream

          // for now will just assume core exception
          // means it
          // doesn't exist on file system, yet.
          // and we'll log, just in case its a noteable error
          Logger.logException(e);
          inputStream = new NullInputStream();
        }
        resettableStream = new BufferedInputStream(inputStream, CodedIO.MAX_BUF_SIZE);
      }
      else {
        if (fInputStream != null) {
          if (fInputStream.markSupported()) {
            resettableStream = fInputStream;
            // try {
            resettableStream.reset();
            // }
            // catch (IOException e) {
            // // assumed just hasn't been marked yet, so ignore
            // }
          }
          else {
            resettableStream = new BufferedInputStream(fInputStream, CodedIO.MAX_BUF_SIZE);
          }
        }
      }

      if (resettableStream == null) {
        resettableStream = new NullInputStream();
      }

      // mark this once, stream at "zero" position
      resettableStream.mark(MAX_MARK_SIZE);
      return resettableStream;
View Full Code Here

Examples of org.jboss.stdio.NullInputStream

        }

        // Install JBoss Stdio to avoid any nasty crosstalk.
        StdioContext.install();
        final StdioContext context = StdioContext.create(
            new NullInputStream(),
            new LoggingOutputStream(Logger.getLogger("stdout"), Level.INFO),
            new LoggingOutputStream(Logger.getLogger("stderr"), Level.ERROR)
        );
        StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context));
View Full Code Here

Examples of org.jboss.stdio.NullInputStream

        }

        // Install JBoss Stdio to avoid any nasty crosstalk.
        StdioContext.install();
        final StdioContext context = StdioContext.create(
            new NullInputStream(),
            new LoggingOutputStream(Logger.getLogger("stdout"), Level.INFO),
            new LoggingOutputStream(Logger.getLogger("stderr"), Level.ERROR)
        );
        StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context));
View Full Code Here

Examples of org.jboss.stdio.NullInputStream

        }

        // Install JBoss Stdio to avoid any nasty crosstalk.
        StdioContext.install();
        final StdioContext context = StdioContext.create(
            new NullInputStream(),
            new LoggingOutputStream(Logger.getLogger("stdout"), Level.INFO),
            new LoggingOutputStream(Logger.getLogger("stderr"), Level.ERROR)
        );
        StdioContext.setStdioContextSelector(new SimpleStdioContextSelector(context));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.