1 /*
2 * Copyright (c) 2019, 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. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25 // (c) 2018 and later: Unicode, Inc. and others.
26 // License & terms of use: http://www.unicode.org/copyright.html#License
27
28 // created: 2018may04 Markus W. Scherer
29
30 package sun.text.normalizer;
31
32 import java.io.DataOutputStream;
33 import java.io.IOException;
34 import java.io.UncheckedIOException;
35 import java.io.OutputStream;
36 import java.nio.ByteBuffer;
37 import java.nio.ByteOrder;
38
39 import static sun.text.normalizer.NormalizerImpl.UTF16Plus;
40
41 /**
42 * Immutable Unicode code point trie.
43 * Fast, reasonably compact, map from Unicode code points (U+0000..U+10FFFF) to integer values.
44 * For details see http://site.icu-project.org/design/struct/utrie
45 *
46 * <p>This class is not intended for public subclassing.
47 *
48 * @see MutableCodePointTrie
49 * @draft ICU 63
50 * @provisional This API might change or be removed in a future release.
51 */
52 @SuppressWarnings("deprecation")
53 public abstract class CodePointTrie extends CodePointMap {
54 /**
55 * Selectors for the type of a CodePointTrie.
56 * Different trade-offs for size vs. speed.
57 *
58 * <p>Use null for {@link #fromBinary} to accept any type;
59 * {@link #getType} will return the actual type.
|
1 /*
2 * Copyright (c) 2019, 2020, 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. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25 // (c) 2018 and later: Unicode, Inc. and others.
26 // License & terms of use: http://www.unicode.org/copyright.html#License
27
28 // created: 2018may04 Markus W. Scherer
29
30 package jdk.internal.icu.util;
31
32 import jdk.internal.icu.impl.ICUBinary;
33
34 import java.io.DataOutputStream;
35 import java.io.IOException;
36 import java.io.UncheckedIOException;
37 import java.io.OutputStream;
38 import java.nio.ByteBuffer;
39 import java.nio.ByteOrder;
40
41 import static jdk.internal.icu.impl.NormalizerImpl.UTF16Plus;
42
43 /**
44 * Immutable Unicode code point trie.
45 * Fast, reasonably compact, map from Unicode code points (U+0000..U+10FFFF) to integer values.
46 * For details see http://site.icu-project.org/design/struct/utrie
47 *
48 * <p>This class is not intended for public subclassing.
49 *
50 * @see MutableCodePointTrie
51 * @draft ICU 63
52 * @provisional This API might change or be removed in a future release.
53 */
54 @SuppressWarnings("deprecation")
55 public abstract class CodePointTrie extends CodePointMap {
56 /**
57 * Selectors for the type of a CodePointTrie.
58 * Different trade-offs for size vs. speed.
59 *
60 * <p>Use null for {@link #fromBinary} to accept any type;
61 * {@link #getType} will return the actual type.
|