OSDN Git Service

dmg作成バージョンの取得方法の修正
[charactermanaj/CharacterManaJ.git] / src / org / apache / tools / zip / UnicodePathExtraField.java
1 /*\r
2  *  Licensed to the Apache Software Foundation (ASF) under one or more\r
3  *  contributor license agreements.  See the NOTICE file distributed with\r
4  *  this work for additional information regarding copyright ownership.\r
5  *  The ASF licenses this file to You under the Apache License, Version 2.0\r
6  *  (the "License"); you may not use this file except in compliance with\r
7  *  the License.  You may obtain a copy of the License at\r
8  *\r
9  *      http://www.apache.org/licenses/LICENSE-2.0\r
10  *\r
11  *  Unless required by applicable law or agreed to in writing, software\r
12  *  distributed under the License is distributed on an "AS IS" BASIS,\r
13  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14  *  See the License for the specific language governing permissions and\r
15  *  limitations under the License.\r
16  *\r
17  */\r
18 \r
19 package org.apache.tools.zip;\r
20 \r
21 /**\r
22  * Info-ZIP Unicode Path Extra Field (0x7075):\r
23  *\r
24  * <p>Stores the UTF-8 version of the file name field as stored in the \r
25  * local header and central directory header.</p>\r
26  *\r
27  * <pre>\r
28  *         Value         Size        Description\r
29  *         -----         ----        -----------\r
30  * (UPath) 0x7075        Short       tag for this extra block type ("up")\r
31  *         TSize         Short       total data size for this block\r
32  *         Version       1 byte      version of this extra field, currently 1\r
33  *         NameCRC32     4 bytes     File Name Field CRC32 Checksum\r
34  *         UnicodeName   Variable    UTF-8 version of the entry File Name\r
35  * </pre>\r
36  */\r
37 public class UnicodePathExtraField extends AbstractUnicodeExtraField {\r
38 \r
39     public static final ZipShort UPATH_ID = new ZipShort(0x7075);\r
40 \r
41     public UnicodePathExtraField () { \r
42     }\r
43 \r
44     /**\r
45      * Assemble as unicode path extension from the name given as\r
46      * text as well as the encoded bytes actually written to the archive.\r
47      * \r
48      * @param text The file name\r
49      * @param bytes the bytes actually written to the archive\r
50      * @param off The offset of the encoded filename in <code>bytes</code>.\r
51      * @param len The length of the encoded filename or comment in\r
52      * <code>bytes</code>.\r
53      */\r
54     public UnicodePathExtraField(String text, byte[] bytes, int off, int len) {\r
55         super(text, bytes, off, len);\r
56     }\r
57 \r
58     /**\r
59      * Assemble as unicode path extension from the name given as\r
60      * text as well as the encoded bytes actually written to the archive.\r
61      * \r
62      * @param name The file name\r
63      * @param bytes the bytes actually written to the archive\r
64      */\r
65     public UnicodePathExtraField(String name, byte[] bytes) {\r
66         super(name, bytes);\r
67     }\r
68 \r
69     public ZipShort getHeaderId() {\r
70         return UPATH_ID;\r
71     }\r
72 }\r