- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中loci.common.ZipHandle
类的一些代码示例,展示了ZipHandle
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipHandle
类的具体详情如下:
包路径:loci.common.ZipHandle
类名称:ZipHandle
[英]StreamHandle implementation for reading from Zip-compressed files or byte arrays. Instances of ZipHandle are read-only.
[中]
代码示例来源:origin: ome/formats-common
private static RandomAccessInputStream openStream(String file)
throws IOException
{
return new RandomAccessInputStream(getHandle(file), file);
}
代码示例来源:origin: ome/formats-common
/**
* Constructs a new ZipHandle corresponding to the given entry of the
* specified Zip file.
*
* @throws HandleException if the given file is not a Zip file.
*/
public ZipHandle(String file, ZipEntry entry) throws IOException {
super();
this.file = file;
in = openStream(file);
zip = new ZipInputStream(in);
entryName = entry.getName();
entryCount = 1;
seekToEntry();
resetStream();
length = entry.getSize();
if (length <= 0) {
populateLength();
}
}
代码示例来源:origin: ome/formats-common
@Override
protected void resetStream() throws IOException {
if (stream != null) stream.close();
if (in != null) {
in.close();
in = openStream(file);
}
if (zip != null) zip.close();
zip = new ZipInputStream(in);
if (entryName != null) seekToEntry();
stream = new DataInputStream(new BufferedInputStream(
zip, RandomAccessInputStream.MAX_OVERHEAD));
stream.mark(RandomAccessInputStream.MAX_OVERHEAD);
}
代码示例来源:origin: org.openmicroscopy/ome-common
this.file = file;
in = openStream(file);
zip = new ZipInputStream(in);
entryName = null;
length += ze.getSize();
resetStream();
populateLength();
代码示例来源:origin: ome/formats-common
handle = new URLHandle(mapId);
else if (allowArchiveHandles && ZipHandle.isZipFile(mapId)) {
handle = new ZipHandle(mapId);
代码示例来源:origin: ome/formats-bsd
ZipHandle handle = new ZipHandle(id, ze);
Location.mapFile(ze.getName(), handle);
mappedFiles.add(ze.getName());
代码示例来源:origin: ome/formats-common
private void populateLength() throws IOException {
length = -1;
while (stream.available() > 0) {
stream.skip(1);
length++;
}
resetStream();
}
代码示例来源:origin: ome/formats-common
this.file = file;
in = openStream(file);
zip = new ZipInputStream(in);
entryName = null;
length += ze.getSize();
resetStream();
populateLength();
代码示例来源:origin: org.openmicroscopy/ome-common
handle = new URLHandle(mapId);
else if (allowArchiveHandles && ZipHandle.isZipFile(mapId)) {
handle = new ZipHandle(mapId);
代码示例来源:origin: org.openmicroscopy/ome-common
@Override
protected void resetStream() throws IOException {
if (stream != null) stream.close();
if (in != null) {
in.close();
in = openStream(file);
}
if (zip != null) zip.close();
zip = new ZipInputStream(in);
if (entryName != null) seekToEntry();
stream = new DataInputStream(new BufferedInputStream(
zip, RandomAccessInputStream.MAX_OVERHEAD));
stream.mark(RandomAccessInputStream.MAX_OVERHEAD);
}
代码示例来源:origin: openmicroscopy/bioformats
ZipHandle handle = new ZipHandle(id, ze);
Location.mapFile(ze.getName(), handle);
mappedFiles.add(ze.getName());
代码示例来源:origin: org.openmicroscopy/ome-common
private void populateLength() throws IOException {
length = -1;
while (stream.available() > 0) {
stream.skip(1);
length++;
}
resetStream();
}
代码示例来源:origin: org.openmicroscopy/ome-common
/**
* Constructs a new ZipHandle corresponding to the given entry of the
* specified Zip file.
*
* @param file a name that can be passed to
* {@link Location#getHandle(String, boolean, boolean)}
* @param entry the specific entry in the Zip file to be opened
* @throws HandleException if the given file is not a Zip file.
* @see ZipEntry
*/
public ZipHandle(String file, ZipEntry entry) throws IOException {
super();
this.file = file;
in = openStream(file);
zip = new ZipInputStream(in);
entryName = entry.getName();
entryCount = 1;
seekToEntry();
resetStream();
length = entry.getSize();
if (length <= 0) {
populateLength();
}
}
代码示例来源:origin: org.openmicroscopy/ome-common
private static RandomAccessInputStream openStream(String file)
throws IOException
{
return new RandomAccessInputStream(getHandle(file), file);
}
代码示例来源:origin: ome/formats-common
/** Returns true if the given filename is a Zip file. */
public static boolean isZipFile(String file) throws IOException {
if (!file.toLowerCase().endsWith(".zip")) return false;
IRandomAccess handle = getHandle(file);
byte[] b = new byte[2];
if (handle.length() >= 2) {
handle.read(b);
}
handle.close();
return new String(b, Constants.ENCODING).equals("PK");
}
代码示例来源:origin: org.openmicroscopy/ome-common
/**
* @param file a name that can be passed to
* {@link Location#getHandle(String, boolean, boolean)}
* @return true if the given filename is a Zip file.
* @throws IOException if the file cannot be read
*/
public static boolean isZipFile(String file) throws IOException {
if (!file.toLowerCase().endsWith(".zip")) return false;
IRandomAccess handle = getHandle(file);
byte[] b = new byte[2];
if (handle.length() >= 2) {
handle.read(b);
}
handle.close();
return new String(b, Constants.ENCODING).equals("PK");
}
本文整理了Java中loci.common.ZipHandle.openStream()方法的一些代码示例,展示了ZipHandle.openStream()的具体用法。这些代码示例主要来源于Gith
本文整理了Java中loci.common.ZipHandle.populateLength()方法的一些代码示例,展示了ZipHandle.populateLength()的具体用法。这些代码示例主
本文整理了Java中loci.common.ZipHandle.isZipFile()方法的一些代码示例,展示了ZipHandle.isZipFile()的具体用法。这些代码示例主要来源于Github
本文整理了Java中loci.common.ZipHandle.()方法的一些代码示例,展示了ZipHandle.()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Mav
本文整理了Java中loci.common.ZipHandle.getHandle()方法的一些代码示例,展示了ZipHandle.getHandle()的具体用法。这些代码示例主要来源于Github
本文整理了Java中loci.common.ZipHandle.resetStream()方法的一些代码示例,展示了ZipHandle.resetStream()的具体用法。这些代码示例主要来源于Gi
本文整理了Java中io.scif.io.ZipHandle.close()方法的一些代码示例,展示了ZipHandle.close()的具体用法。这些代码示例主要来源于Github/Stackove
本文整理了Java中org.apache.maven.index.util.zip.ZipHandle.close()方法的一些代码示例,展示了ZipHandle.close()的具体用法。这些代码示
本文整理了Java中org.apache.maven.index.util.zip.ZipHandle.getEntries()方法的一些代码示例,展示了ZipHandle.getEntries()的
本文整理了Java中org.apache.maven.index.util.zip.ZipHandle.hasEntry()方法的一些代码示例,展示了ZipHandle.hasEntry()的具体用法
我是一名优秀的程序员,十分优秀!