• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * This code is free software; you can redistribute it and/or modify it
6  * under the terms of the GNU General Public License version 2 only, as
7  * published by the Free Software Foundation.
8  *
9  * This code is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  */
23 
24 /**
25  * Holds the file paths to the Unicode Character Database source files.
26  * Paths to the source files in the "data" directory are relative.
27  */
28 
29 package test.java.lang;
30 
31 import java.net.URL;
32 import java.nio.file.Path;
33 import java.nio.file.Paths;
34 
35 public class UCDFiles {
36     // Android-changed: Unicode data is packaged as resources in CTS.
37     // Resource file can't be converted to path because libcore doesn't have a FileSystemProvider
38     // for jar:// scheme.
39     // public static Path UCD_DIR = Paths.get(System.getProperty("test.root"),
40     //     "../../src/java.base/share/data/unicodedata");
41 
42     // Android-changed: Unicode data is packaged as resources in CTS.
43     // public static Path BLOCKS =
44     //     UCD_DIR.resolve("Blocks.txt");
45     public static URL BLOCKS = UCDFiles.class.getClassLoader()
46             .getResource("data/unicodedata/Blocks.txt");
47 
48     // Android-removed: unused paths.
49     /*
50     public static Path DERIVED_PROPS =
51         UCD_DIR.resolve("DerivedCoreProperties.txt");
52     public static Path GRAPHEME_BREAK_PROPERTY =
53         UCD_DIR.resolve("auxiliary").resolve("GraphemeBreakProperty.txt");
54     public static Path GRAPHEME_BREAK_TEST =
55         UCD_DIR.resolve("auxiliary").resolve("GraphemeBreakTest.txt");
56     public static Path NORMALIZATION_TEST =
57         UCD_DIR.resolve("NormalizationTest.txt");
58     public static Path PROP_LIST =
59         UCD_DIR.resolve("PropList.txt");
60     public static Path PROPERTY_VALUE_ALIASES =
61         UCD_DIR.resolve("PropertyValueAliases.txt");
62     public static Path SCRIPTS =
63         UCD_DIR.resolve("Scripts.txt");
64     public static Path SPECIAL_CASING =
65         UCD_DIR.resolve("SpecialCasing.txt");
66     public static Path UNICODE_DATA =
67         UCD_DIR.resolve("UnicodeData.txt");
68     public static Path EMOJI_DATA =
69         UCD_DIR.resolve("emoji").resolve("emoji-data.txt");
70      */
71 }
72