Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Apache Ant Source Code Files
Apache Ant Source Code Files are inside the Apache Ant source package file
like apache-ant-1.10.10-src.zip.
Unzip the source package file and go to the "src/main" sub-directory,
you will see source code files.
Here is the list of Java source code files of the Apache Ant 1.10.10 in \Users\fyicenter\apache-ant-1.10.10\src\main:
✍: FYIcenter.com
⏎ org/apache/tools/zip/ZipEncoding.java
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.tools.zip;
import java.io.IOException;
import java.nio.ByteBuffer;
/**
* An interface for encoders that do a pretty encoding of ZIP
* filenames.
*
* <p>There are mostly two implementations, one that uses java.nio
* {@link java.nio.charset.Charset Charset} and one implementation,
* which copes with simple 8 bit charsets, because java-1.4 did not
* support Cp437 in java.nio.</p>
*
* <p>The main reason for defining an own encoding layer comes from
* the problems with {@link java.lang.String#getBytes(String)
* String.getBytes}, which encodes unknown characters as ASCII
* quotation marks ('?'). Quotation marks are per definition an
* invalid filename on some operating systems like Windows, which
* leads to ignored ZIP entries.</p>
*
* <p>All implementations should implement this interface in a
* reentrant way.</p>
*/
public interface ZipEncoding {
/**
* Check, whether the given string may be losslessly encoded using this
* encoding.
*
* @param name A filename or ZIP comment.
* @return Whether the given name may be encoded with out any losses.
*/
boolean canEncode(String name);
/**
* Encode a filename or a comment to a byte array suitable for
* storing it to a serialized zip entry.
*
* <p>Examples for CP 437 (in pseudo-notation, right hand side is
* C-style notation):</p>
* <pre>
* encode("\u20AC_for_Dollar.txt") = "%U20AC_for_Dollar.txt"
* encode("\u00D6lf\u00E4sser.txt") = "\231lf\204sser.txt"
* </pre>
*
* @param name A filename or ZIP comment.
* @return A byte buffer with a backing array containing the
* encoded name. Unmappable characters or malformed
* character sequences are mapped to a sequence of utf-16
* words encoded in the format <code>%Uxxxx</code>. It is
* assumed, that the byte buffer is positioned at the
* beginning of the encoded result, the byte buffer has a
* backing array and the limit of the byte buffer points
* to the end of the encoded result.
* @throws IOException if something goes wrong
*/
ByteBuffer encode(String name) throws IOException;
/**
* @param data The byte values to decode.
* @return The decoded string.
* @throws IOException if something goes wrong
*/
String decode(byte[] data) throws IOException;
}
⏎ org/apache/tools/zip/ZipEncoding.java
Or download all of them as a single archive file:
File name: apache-ant-1.10.10-fyi.zip File size: 2392938 bytes Release date: 2021-04-17 Download
⇐ Download Apache Ant Source Package
2021-07-10, ≈405🔥, 0💬
Popular Posts:
JDK 11 jdk.jconsole.jmod is the JMOD file for JDK 11 JConsole tool, which can be invoked by the "jco...
JDK 17 jdk.incubator.vector.jmo dis the JMOD file for JDK 17 HTTP Server module. JDK 17 Incubator Ve...
JDK 11 jdk.httpserver.jmod is the JMOD file for JDK 11 HTTP Server module. JDK 11 HTTP Server module...
itextpdf.jar is a component in iText 5 Java library to provide core functionalities. iText Java libr...
What Is mail.jar of JavaMail 1.4.2? I got the JAR file from javamail-1.4.2.zip. mail.jar in javamail...