Package gnu.java.nio

Examples of gnu.java.nio.InputStreamChannel


    public void read(long fileOffset, ByteBuffer destBuf) throws IOException {
        final JarFileSystem fs = (JarFileSystem) getFileSystem();
        final JarFile jarFile = fs.getJarFile();
        final InputStream is = jarFile.getInputStream(entry.getJarEntry());
        is.skip(fileOffset);
        InputStreamChannel isc = new InputStreamChannel(is);
        isc.read(destBuf);
        isc.close();
        is.close();
    }
View Full Code Here


  /**
   * Constructs a channel that reads bytes from the given stream.
   */
  public static ReadableByteChannel newChannel(InputStream in)
  {
    return new InputStreamChannel(in);
  }
View Full Code Here

TOP

Related Classes of gnu.java.nio.InputStreamChannel

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.