本文整理了Java中com.marklogic.mapreduce.ZipEntryInputStream
类的一些代码示例,展示了ZipEntryInputStream
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipEntryInputStream
类的具体详情如下:
包路径:com.marklogic.mapreduce.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;
}
内容来源于网络,如有侵权,请联系作者删除!