3909N/A * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved. 893N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 893N/A * This code is free software; you can redistribute it and/or modify it 893N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 893N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 893N/A * This code is distributed in the hope that it will be useful, but WITHOUT 893N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 893N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 893N/A * version 2 for more details (a copy is included in the LICENSE file that 893N/A * accompanied this code). 893N/A * You should have received a copy of the GNU General Public License version 893N/A * 2 along with this work; if not, write to the Free Software Foundation, 893N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 893N/A * Unix specific Path <--> URI conversion 3497N/A // compatability with java.io.File 3497N/A // transformation use raw path 3497N/A // transform escaped octets and unescaped characters to bytes 893N/A // trailing slash if directory 893N/A // The following is copied from java.net.URI 893N/A // Compute the low-order mask for the characters in the given string 893N/A for (
int i =
0; i < n; i++) {
893N/A // Compute the high-order mask for the characters in the given string 893N/A for (
int i =
0; i < n; i++) {
893N/A if ((c >=
64) && (c <
128))
893N/A // Compute a low-order mask for the characters 893N/A // between first and last, inclusive 893N/A for (
int i = f; i <= l; i++)
893N/A // Compute a high-order mask for the characters 893N/A // between first and last, inclusive 893N/A for (
int i = f; i <= l; i++)
893N/A // Tell whether the given character is permitted by the given mask pair 3497N/A if ((c >=
'0') && (c <=
'9'))
3497N/A if ((c >=
'a') && (c <=
'f'))
3497N/A if ((c >=
'A') && (c <=
'F'))
893N/A // digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | 893N/A // upalpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | 893N/A // "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | 893N/A // "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" 893N/A // lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | 893N/A // "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | 893N/A // "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" 893N/A // alpha = lowalpha | upalpha 893N/A // alphanum = alpha | digit 893N/A // mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | 893N/A // unreserved = alphanum | mark 893N/A // pchar = unreserved | escaped | 893N/A // ":" | "@" | "&" | "=" | "+" | "$" | "," 893N/A // All valid path characters 893N/A '0',
'1',
'2',
'3',
'4',
'5',
'6',
'7',
893N/A '8',
'9',
'A',
'B',
'C',
'D',
'E',
'F'