Package java.nio.channels.Pipe

Examples of java.nio.channels.Pipe.SourceChannel


    // Test on an unseekable input steam
    File targetFolder = _temporaryFolder.newFolder("unpacked4");

    final Pipe zipPipe = Pipe.open();
    final SinkChannel sink = zipPipe.sink();
    final SourceChannel source = zipPipe.source();
    final InputStream sourceIn = Channels.newInputStream(source);
    final OutputStream sourceOut = Channels.newOutputStream(sink);
    final ZipInputStream zis = new ZipInputStream(sourceIn);
    final FileInputStream fis = new FileInputStream(TestResources.SHARD1);
    final AtomicBoolean failed = new AtomicBoolean(false);
View Full Code Here


        this.logger = logger;
        try
        {
            Pipe p = Pipe.open();
            SinkChannel sink = p.sink();
            SourceChannel source = p.source();
            writer = Channels.newWriter( sink, Charset.defaultCharset().name() );
            reader = Channels.newReader( source, Charset.defaultCharset().name() );
            parser.setInput( reader );

        }
View Full Code Here

  /**
   * @tests java.nio.channels.Pipe#source()
   */
  public void test_source() throws IOException {
    Pipe pipe = Pipe.open();
    SourceChannel source = pipe.source();
    assertTrue(source.isBlocking());
  }
View Full Code Here

        this.logger = logger;
        try
        {
            Pipe p = Pipe.open();
            SinkChannel sink = p.sink();
            SourceChannel source = p.source();
            writer = Channels.newWriter( sink, Charset.defaultCharset().name() );
            reader = Channels.newReader( source, Charset.defaultCharset().name() );
            parser.setInput( reader );

        }
View Full Code Here

  /**
   * @tests java.nio.channels.Pipe#source()
   */
  public void test_source() throws IOException {
    Pipe pipe = Pipe.open();
    SourceChannel source = pipe.source();
    assertTrue(source.isBlocking());
  }
View Full Code Here

TOP

Related Classes of java.nio.channels.Pipe.SourceChannel

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.