throw css around like mad (very minimal stylesheet in place)

This commit is contained in:
jrandom
2005-09-06 20:05:09 +00:00
committed by zzz
parent e6b145716f
commit e0e6bde4a5
21 changed files with 680 additions and 546 deletions

View File

@ -4,6 +4,7 @@ import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import net.i2p.I2PAppContext;
import net.i2p.data.Base64;
import net.i2p.data.Hash;
import org.bouncycastle.crypto.digests.SHA256Digest;
@ -72,5 +73,7 @@ public final class SHA256Generator {
byte out[] = new byte[Hash.HASH_LENGTH];
d.doFinal(out, 0);
System.out.println("eq? " + net.i2p.data.DataHelper.eq(out, old.getData()));
for (int i = 0; i < args.length; i++)
System.out.println("SHA256 [" + args[i] + "] = [" + Base64.encode(ctx.sha().calculateHash(args[i].getBytes()).getData()) + "]");
}
}

View File

@ -131,6 +131,7 @@ public class FileUtil {
*
* @param startAtBeginning if true, read the first maxNumLines, otherwise read
* the last maxNumLines
* @param maxNumLines max number of lines (or -1 for unlimited)
*
*/
public static String readTextFile(String filename, int maxNumLines, boolean startAtBeginning) {
@ -140,11 +141,11 @@ public class FileUtil {
try {
fis = new FileInputStream(f);
BufferedReader in = new BufferedReader(new InputStreamReader(fis));
List lines = new ArrayList(maxNumLines);
List lines = new ArrayList(maxNumLines > 0 ? maxNumLines : 64);
String line = null;
while ( (line = in.readLine()) != null) {
lines.add(line);
if (lines.size() >= maxNumLines) {
if ( (maxNumLines > 0) && (lines.size() >= maxNumLines) ) {
if (startAtBeginning)
break;
else