com.marklogic.mapreduce.ZipEntryInputStream类的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(72)

本文整理了Java中com.marklogic.mapreduce.ZipEntryInputStream类的一些代码示例,展示了ZipEntryInputStream类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipEntryInputStream类的具体详情如下:
包路径:com.marklogic.mapreduce.ZipEntryInputStream
类名称:ZipEntryInputStream

ZipEntryInputStream介绍

[英]ZipEntryInputStream is a wrapper class of ZipInputStream to interface with XCC so that the zip entries can be read sequentially.
[中]ZipPentryInputStream是ZipInputStream的包装类,用于与XCC接口,以便可以顺序读取zip条目。

代码示例

代码示例来源:origin: com.marklogic/marklogic-mapreduce2

public ZipEntryInputStream(ZipInputStream zipIn, String fileName) {
  this.zipIn = zipIn;   
  this.fileName = fileName;
  // advance the stream to the first zip entry position.
  hasNext();
}

代码示例来源:origin: com.marklogic/mlcp

is.close();
if (is instanceof ZipEntryInputStream) {
  ((ZipEntryInputStream)is).closeZipInputStream();

代码示例来源:origin: com.marklogic/marklogic-mapreduce2

InputStream zipfileIn = fs.open(path);
ZipInputStream zis = new ZipInputStream(zipfileIn);
is = new ZipEntryInputStream(zis, path.toString());

代码示例来源:origin: com.marklogic/marklogic-mapreduce2

is.close();
if (is instanceof ZipEntryInputStream) {
  ((ZipEntryInputStream)is).closeZipInputStream();

代码示例来源:origin: com.marklogic/marklogic-mapreduce2

@Override 
public int read(byte[] b, int off, int len) throws IOException {
  int bytes = zipIn.read();
  if (bytes == -1) {
    hasNext();
  }
  if (LOG.isTraceEnabled()) {
    LOG.trace("bytes read from " + fileName + " " + entryName + 
        ": " + bytes);
  }
  return bytes;
}

代码示例来源:origin: com.marklogic/marklogic-mapreduce2

@Override
public int read(byte[] buf) throws IOException {
  int bytes = zipIn.read(buf);
  if (bytes == -1) {
    hasNext();
  }
  if (LOG.isTraceEnabled()) {
    LOG.trace("bytes read from " + fileName + " " + entryName + 
        ": " + bytes);
  }
  return bytes;
}

代码示例来源:origin: com.marklogic/marklogic-mapreduce2

@Override
public int read() throws IOException {  
  int bytes = zipIn.read();
  if (bytes == -1) {
    // advance the stream to the next entry if done with this one.
    hasNext();
  }
  if (LOG.isTraceEnabled()) {
    LOG.trace("bytes read from " + fileName + " " + entryName + 
        ": " + bytes);
  }
  return bytes;
}

相关文章

ZipEntryInputStream类方法