本文整理了Java中de.schlichtherle.truezip.zip.ZipFile.getInputStream()
方法的一些代码示例,展示了ZipFile.getInputStream()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipFile.getInputStream()
方法的具体详情如下:
包路径:de.schlichtherle.truezip.zip.ZipFile
类名称:ZipFile
方法名:getInputStream
暂无
代码示例来源:origin: apache/maven-indexer
public InputStream getEntryContent( String path )
throws IOException
{
ZipEntry entry = getZipFile().getEntry( path );
if ( entry != null )
{
return getZipFile().getInputStream( entry );
}
else
{
return null;
}
}
代码示例来源:origin: org.jboss.windup.org.apache.maven.indexer/indexer-core
public InputStream getEntryContent( String path )
throws IOException
{
ZipEntry entry = getZipFile().getEntry( path );
if ( entry != null )
{
return getZipFile().getInputStream( entry );
}
else
{
return null;
}
}
代码示例来源:origin: org.apache.maven.indexer/indexer-core
public InputStream getEntryContent( String path )
throws IOException
{
ZipEntry entry = getZipFile().getEntry( path );
if ( entry != null )
{
return getZipFile().getInputStream( entry );
}
else
{
return null;
}
}
代码示例来源:origin: uk.gov.nationalarchives/droid-results
.getInputStream(entry));
代码示例来源:origin: digital-preservation/droid
try (final InputStream in = new BufferedInputStream(zip.getInputStream(entry));
final OutputStream out = new BufferedOutputStream(Files.newOutputStream(expandedFile))) {
bytesSoFar = readFile(in, out, observer, bytesSoFar, totalSize);
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
@Test
public final void testGetInputStream() throws IOException {
final ZipOutputStream zipOut
= newZipOutputStream(new FileOutputStream(file));
try {
zipOut.putNextEntry(newEntry("foo"));
} finally {
zipOut.close();
}
final ZipFile zipIn = newZipFile(file);
try {
zipIn.getInputStream("foo").close();
assertNull(zipIn.getInputStream("bar"));
} finally {
zipIn.close();
}
}
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
@Test
public final void testWriteAndReadSingleBytes() throws IOException {
final ZipOutputStream zipOut
= newZipOutputStream(new FileOutputStream(file));
zipOut.putNextEntry(newEntry("file"));
for (int i = 0; i < data.length; i++)
zipOut.write(data[i]);
zipOut.close();
final ZipFile zipIn = newZipFile(file);
InputStream in = zipIn.getInputStream("file");
for (int i = 0, c; (c = in.read()) != -1; i++)
assertEquals(data[i] & 0xFF, c);
in.close();
zipIn.close();
}
代码示例来源:origin: digital-preservation/droid
if (entry != null) {
InputStream stream = zipFile.getInputStream(entry);
ByteReader reader = null;
try {
代码示例来源:origin: uk.gov.nationalarchives/droid-container
if (entry != null) {
InputStream stream = zipFile.getInputStream(entry);
ByteReader reader = null;
try {
代码示例来源:origin: uk.gov.nationalarchives/droid-core-interfaces
InputStream in = null;
try {
in = file.getInputStream(entry);
request.open(in);
} finally {
代码示例来源:origin: digital-preservation/droid
InputStream in = null;
try {
in = file.getInputStream(entry);
request.open(in);
} finally {
代码示例来源:origin: de.schlichtherle.truezip/truezip-driver-zip
final ZipEntry entry = zipIn.getEntry(name);
assertEquals(data1.length, entry.getSize());
final InputStream in = zipIn.getInputStream(name);
try {
int off = 0;
内容来源于网络,如有侵权,请联系作者删除!