throw css around like mad (very minimal stylesheet in place)
This commit is contained in:
@ -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()) + "]");
|
||||
}
|
||||
}
|
@ -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
|
||||
|
Reference in New Issue
Block a user