- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.googlecode.d2j.util.zip.ZipEntry
类的一些代码示例,展示了ZipEntry
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipEntry
类的具体详情如下:
包路径:com.googlecode.d2j.util.zip.ZipEntry
类名称:ZipEntry
[英]An entry within a zip file. An entry has attributes such as its name (which is actually a path) and the uncompressed size of the corresponding data. An entry does not contain the data itself, but can be used as a key with java.util.zip.ZipFile#getInputStream. The class documentation for java.util.zip.ZipInputStream and java.util.zip.ZipOutputStream shows how android.ZipEntry is used in conjunction with those two classes.
[中]zip文件中的条目。条目具有名称(实际上是路径)和相应数据的未压缩大小等属性。条目本身不包含数据,但可以在java中用作密钥。util。拉链ZipFile#getInputStream。java类文档。util。拉链ZipInputStream和java。util。拉链ZipOutputStream展示了android是如何实现的。ZipEntry与这两个类一起使用。
代码示例来源:origin: pxb1988/dex2jar
private ZipEntry findFirstEntry0(String entryName) {
for (ZipEntry e : entries) {
if (e.getName().equals(entryName)) {
return e;
}
}
return null;
}
代码示例来源:origin: pxb1988/dex2jar
entries = new ArrayList<>(numEntries);
for (int i = 0; i < numEntries; ++i) {
ZipEntry newEntry = new ZipEntry(buf, skipCommentsAndExtra);
if (newEntry.localHeaderRelOffset >= centralDirOffset) {
代码示例来源:origin: pxb1988/dex2jar
@Override
public int available() throws IOException {
return super.available() == 0 ? 0 : (int) (entry.getSize() - bytesRead);
}
}
代码示例来源:origin: pxb1988/dex2jar
try(com.googlecode.d2j.util.zip.ZipFile zipFile = new com.googlecode.d2j.util.zip.ZipFile(data)) {
for (com.googlecode.d2j.util.zip.ZipEntry e : zipFile.entries()) {
ZipEntry nEntry = new ZipEntry(e.getName());
nEntry.setMethod(e.getMethod() == com.googlecode.d2j.util.zip.ZipEntry.STORED ? ZipEntry.STORED
: ZipEntry.DEFLATED);
zos.putNextEntry(nEntry);
代码示例来源:origin: pxb1988/dex2jar
@Test
public void test0() throws IOException {
byte[] data = ZipUtil.toByteArray(BadZipEntryFlagTest.class.getResourceAsStream("/bad.zip"));
try (ZipFile zip = new ZipFile(data)) {
for (com.googlecode.d2j.util.zip.ZipEntry e : zip.entries()) {
System.out.println(e);
if (!e.isDirectory()) {
zip.getInputStream(e).read();
}
}
}
}
代码示例来源:origin: pxb1988/dex2jar
@Override
public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException {
final int i;
try {
i = super.read(buffer, byteOffset, byteCount);
} catch (IOException e) {
throw new IOException("Error reading data for " + entry.getName() + " near offset " + bytesRead, e);
}
if (i == -1) {
if (entry.size != bytesRead) {
throw new IOException("Size mismatch on inflated file: " + bytesRead + " vs " + entry.size);
}
} else {
bytesRead += i;
}
return i;
}
代码示例来源:origin: pxb1988/dex2jar
/**
* Returns an input stream on the data of the specified {@code android.ZipEntry}.
*
* @param entry
* the android.ZipEntry.
* @return an input stream of the data contained in the {@code android.ZipEntry}.
* @throws java.io.IOException
* if an {@code IOException} occurs.
* @throws IllegalStateException
* if this zip file has been closed.
*/
public InputStream getInputStream(ZipEntry entry) throws IOException {
long entryDataStart = getEntryDataStart(entry);
ByteBuffer is = (ByteBuffer) raf.duplicate().position((int) entryDataStart);
if (entry.compressionMethod == ZipEntry.STORED) {
final ByteBuffer buf = (ByteBuffer) is.slice().order(ByteOrder.LITTLE_ENDIAN).limit((int) entry.size);
return new ByteBufferBackedInputStream(buf);
} else {
final ByteBuffer buf = (ByteBuffer) is.slice().order(ByteOrder.LITTLE_ENDIAN)
.limit((int) entry.compressedSize);
int bufSize = Math.max(1024, (int) Math.min(entry.getSize(), 65535L));
return new ZipInflaterInputStream(new ByteBufferBackedInputStream(buf), new Inflater(true), bufSize, entry);
}
}
代码示例来源:origin: SparkInLee/dexdiff
entries = new ArrayList<>(numEntries);
for (int i = 0; i < numEntries; ++i) {
ZipEntry newEntry = new ZipEntry(buf, skipCommentsAndExtra);
if (newEntry.localHeaderRelOffset >= centralDirOffset) {
代码示例来源:origin: pxb1988/dex2jar
public static BaseDexFileReader open(byte[] data) throws IOException {
if (data.length < 3) {
throw new IOException("File too small to be a dex/zip");
}
if ("dex".equals(new String(data, 0, 3, StandardCharsets.ISO_8859_1))) {// dex
return new DexFileReader(data);
} else if ("PK".equals(new String(data, 0, 2, StandardCharsets.ISO_8859_1))) {// ZIP
TreeMap<String, DexFileReader> dexFileReaders = new TreeMap<>();
try (ZipFile zipFile = new ZipFile(data)) {
for (ZipEntry e : zipFile.entries()) {
String entryName = e.getName();
if (entryName.startsWith("classes") && entryName.endsWith(".dex")) {
if (!dexFileReaders.containsKey(entryName)) { // only the first one
dexFileReaders.put(entryName, new DexFileReader(toByteArray(zipFile.getInputStream(e))));
}
}
}
}
if (dexFileReaders.size() == 0) {
throw new IOException("Can not find classes.dex in zip file");
} else if (dexFileReaders.size() == 1) {
return dexFileReaders.firstEntry().getValue();
} else {
return new MultiDexFileReader(dexFileReaders.values());
}
}
throw new IOException("the src file not a .dex or zip file");
}
代码示例来源:origin: SparkInLee/dexdiff
@Override
public int available() throws IOException {
return super.available() == 0 ? 0 : (int) (entry.getSize() - bytesRead);
}
}
代码示例来源:origin: SparkInLee/dexdiff
private ZipEntry findFirstEntry0(String entryName) {
for (ZipEntry e : entries) {
if (e.getName().equals(entryName)) {
return e;
}
}
return null;
}
代码示例来源:origin: SparkInLee/dexdiff
/**
* Returns an input stream on the data of the specified {@code android.ZipEntry}.
*
* @param entry
* the android.ZipEntry.
* @return an input stream of the data contained in the {@code android.ZipEntry}.
* @throws java.io.IOException
* if an {@code IOException} occurs.
* @throws IllegalStateException
* if this zip file has been closed.
*/
public InputStream getInputStream(ZipEntry entry) throws IOException {
long entryDataStart = getEntryDataStart(entry);
ByteBuffer is = (ByteBuffer) raf.duplicate().position((int) entryDataStart);
if (entry.compressionMethod == ZipEntry.STORED) {
final ByteBuffer buf = (ByteBuffer) is.slice().order(ByteOrder.LITTLE_ENDIAN).limit((int) entry.size);
return new ByteBufferBackedInputStream(buf);
} else {
final ByteBuffer buf = (ByteBuffer) is.slice().order(ByteOrder.LITTLE_ENDIAN)
.limit((int) entry.compressedSize);
int bufSize = Math.max(1024, (int) Math.min(entry.getSize(), 65535L));
return new ZipInflaterInputStream(new ByteBufferBackedInputStream(buf), new Inflater(true), bufSize, entry);
}
}
代码示例来源:origin: SparkInLee/dexdiff
@Override
public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException {
final int i;
try {
i = super.read(buffer, byteOffset, byteCount);
} catch (IOException e) {
throw new IOException("Error reading data for " + entry.getName() + " near offset " + bytesRead, e);
}
if (i == -1) {
if (entry.size != bytesRead) {
throw new IOException("Size mismatch on inflated file: " + bytesRead + " vs " + entry.size);
}
} else {
bytesRead += i;
}
return i;
}
代码示例来源:origin: SparkInLee/dexdiff
public static BaseDexFileReader open(byte[] data) throws IOException {
if (data.length < 3) {
throw new IOException("File too small to be a dex/zip");
}
if ("dex".equals(new String(data, 0, 3, StandardCharsets.ISO_8859_1))) {// dex
return new DexFileReader(data);
} else if ("PK".equals(new String(data, 0, 2, StandardCharsets.ISO_8859_1))) {// ZIP
TreeMap<String, DexFileReader> dexFileReaders = new TreeMap<>();
try (ZipFile zipFile = new ZipFile(data)) {
for (ZipEntry e : zipFile.entries()) {
String entryName = e.getName();
if (entryName.startsWith("classes") && entryName.endsWith(".dex")) {
if (!dexFileReaders.containsKey(entryName)) { // only the first one
dexFileReaders.put(entryName, new DexFileReader(toByteArray(zipFile.getInputStream(e))));
}
}
}
}
if (dexFileReaders.size() == 0) {
throw new IOException("Can not find classes.dex in zip file");
} else if (dexFileReaders.size() == 1) {
return dexFileReaders.firstEntry().getValue();
} else {
return new MultiDexFileReader(dexFileReaders.values());
}
}
throw new IOException("the src file not a .dex or zip file");
}
我正在使用com.googlecode.mp4parser库合并音频文件。我有一个外部音频mp3文件,该文件存储在raw资源中。由于以下异常,此文件无法合并,以下是我的代码: 从原始文件夹读取文件:
本文整理了Java中com.googlecode.htmlcompressor.compressor.XmlCompressor类的一些代码示例,展示了XmlCompressor类的具体用法。这些代码
本文整理了Java中com.googlecode.htmlcompressor.compressor.YuiJavaScriptCompressor类的一些代码示例,展示了YuiJavaScriptC
本文整理了Java中com.googlecode.htmlcompressor.compressor.YuiCssCompressor类的一些代码示例,展示了YuiCssCompressor类的具体用
我目前在 googlecode svn 上托管我的项目,但是我想在另一个 svn 服务器(也在线)上托管它的副本,有人可以建议保持备份和更新的最佳方法吗? 最佳答案 转储和同步会起作用,但它可能最容易
我想在hadoop上运行一个应用程序,在该应用程序中,我具有以下导入:“import com.googlecode.javacpp.BytePointer”。在hadoop上运行它后,我得到了: 13
我有一个使用下面这个链接的网页,现在每次我访问该页面时都会出现一个对话框,要求使用用户名和密码进行身份验证。我以前从未发生过这种情况。这是一个错误还是新的东西,有人以前见过这个,有办法解决这个问题吗?
本文整理了Java中com.googlecode.d2j.reader.zip.ZipUtil类的一些代码示例,展示了ZipUtil类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中com.googlecode.d2j.util.zip.ZipFile类的一些代码示例,展示了ZipFile类的具体用法。这些代码示例主要来源于Github/Stackoverfl
本文整理了Java中com.googlecode.d2j.util.zip.ZipEntry类的一些代码示例,展示了ZipEntry类的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中com.googlecode.streamflyer.internal.thirdparty.ZzzValidate类的一些代码示例,展示了ZzzValidate类的具体用法。这些
本文整理了Java中com.googlecode.zohhak.api.runners.ZohhakRunner类的一些代码示例,展示了ZohhakRunner类的具体用法。这些代码示例主要来源于Gi
如何在 googlecode 中创建私有(private) svn 存储库。 最佳答案 这是不可能的。来自 FAQ : All open source developers. If you plan
本文整理了Java中com.googlecode.htmlcompressor.compressor.XmlCompressor.removeComments()方法的一些代码示例,展示了XmlCom
本文整理了Java中com.googlecode.htmlcompressor.compressor.XmlCompressor.setRemoveIntertagSpaces()方法的一些代码示例,
本文整理了Java中com.googlecode.htmlcompressor.compressor.XmlCompressor.removeIntertagSpaces()方法的一些代码示例,展示了
本文整理了Java中com.googlecode.htmlcompressor.compressor.XmlCompressor.compress()方法的一些代码示例,展示了XmlCompresso
本文整理了Java中com.googlecode.htmlcompressor.compressor.XmlCompressor.setRemoveComments()方法的一些代码示例,展示了Xml
本文整理了Java中com.googlecode.htmlcompressor.compressor.XmlCompressor.setEnabled()方法的一些代码示例,展示了XmlCompres
本文整理了Java中com.googlecode.htmlcompressor.compressor.XmlCompressor.()方法的一些代码示例,展示了XmlCompressor.()的具体用
我是一名优秀的程序员,十分优秀!