Util.java revision 92
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* ident "@(#)Util.java 1.2 05/12/01 SMI"
*/
/**
* File for useful functions
*/
public class Util {
/**
* Return a string which represents a <code>CharSequence</code> in HTML.
*
* @param q a character sequence
* @return a string representing the character sequence in HTML
*/
}
/**
* Append a character sequence to an <code>Appendable</code> object. Escape
* special characters for HTML.
*
* @param q a character sequence
* @param out the object to append the character sequence to
* @exception IOException if an I/O error occurs
*/
throws IOException {
for (int i = 0; i < q.length(); i++) {
}
}
/**
* Append a character sequence to a <code>StringBuilder</code>
* object. Escape special characters for HTML. This method is identical to
* <code>Htmlize(CharSequence,Appendable)</code>, except that it is
* guaranteed not to throw <code>IOException</code> because it uses a
* <code>StringBuilder</code>.
*
* @param q a character sequence
* @param out the object to append the character sequence to
* @see #Htmlize(CharSequence, Appendable)
*/
try {
} catch (IOException ioe) {
// StringBuilder's append methods are not declared to throw
// IOException, so this should never happen.
throw new RuntimeException(
"StringBuilder should not throw IOException", ioe);
}
}
throws IOException {
}
}
/**
* Append a character to a an <code>Appendable</code> object. If the
* character has special meaning in HTML, append a sequence of characters
* representing the special character.
*
* @param c the character to append
* @param out the object to append the character to
* @exception IOException if an I/O error occurs
*/
switch (c) {
}
}
}
return l;
}
int s = 0,e = 0;
if(e-s>0){
}
s = e+1;
}
if (s < l.length()) {
}
}
float l = (float) num;
if ( l < 1024 ) {
} else if ( l < 1048576 ) {
} else {
}
}
throws IOException {
if (num > 1) {
}
if (annotation != null) {
}
}
}
}
/**
* Append path and date into a string in such a way that lexicographic
* sorting gives the same results as a walk of the file hierarchy. Thus
* null (\u0000) is used both to separate directory components and to
* separate the path from the date.
*/
}
}
private static char[] hexdigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
char c;
for(int i=0; i < q.length() ; i++) {
c = q.charAt(i);
if ((c >= 'a' && c <= 'z')
||(c >= 'A' && c <= 'Z')
||(c >= '0' && c <= '9')) {
} else {
}
}
}
if (q == null) {
return "";
}
char c;
for(int i=0; i < q.length() ; i++) {
c = q.charAt(i);
if(c == '"') {
} else {
}
}
}
return null;
}
}
return rcsFile;
}
// not RCS, try CVS instead
}
try{
repoReader.close();
rootReader.close();
}
return rcsFile;
}
rootReader.close();
}
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}
}
}
}