gpt4 book ai didi

loci.common.ZipHandle.getHandle()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 07:21:31 27 4
gpt4 key购买 nike

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

ZipHandle.getHandle介绍

暂无

代码示例

代码示例来源:origin: org.openmicroscopy/ome-common

private static RandomAccessInputStream openStream(String file)
 throws IOException
{
 return new RandomAccessInputStream(getHandle(file), file);
}

代码示例来源:origin: ome/formats-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");
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com