1 /* |
1 /* |
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
25 |
25 |
26 package com.sun.tools.javac.util; |
26 package com.sun.tools.javac.util; |
27 |
27 |
28 /** Utility class for static conversion methods between numbers |
28 /** Utility class for static conversion methods between numbers |
29 * and strings in various formats. |
29 * and strings in various formats. |
|
30 * |
|
31 * <p>Note regarding UTF-8. |
|
32 * The JVMS defines its own version of the UTF-8 format so that it |
|
33 * contains no zero bytes (modified UTF-8). This is not actually the same |
|
34 * as Charset.forName("UTF-8"). |
|
35 * |
|
36 * <p> |
|
37 * See also: |
|
38 * <ul> |
|
39 * <li><a href="http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4.7"> |
|
40 * JVMS 4.4.7 </a></li> |
|
41 * <li><a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataInput.html#modified-utf-8"> |
|
42 java.io.DataInput: Modified UTF-8 </a></li> |
|
43 <li><a href="https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8"> |
|
44 Modified UTF-8 (wikipedia) </a></li> |
|
45 * </ul> |
|
46 * |
|
47 * The methods here support modified UTF-8. |
30 * |
48 * |
31 * <p><b>This is NOT part of any supported API. |
49 * <p><b>This is NOT part of any supported API. |
32 * If you write code that depends on this, you do so at your own risk. |
50 * If you write code that depends on this, you do so at your own risk. |
33 * This code and its internal interfaces are subject to change or |
51 * This code and its internal interfaces are subject to change or |
34 * deletion without notice.</b> |
52 * deletion without notice.</b> |