small change

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@679 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
borg-0300 20 years ago
parent e6338b4390
commit 718950c5da

@ -73,7 +73,7 @@ public class listManager {
//removes a List from a Lists-List //removes a List from a Lists-List
public static void removeListFromListslist(String ListName, String BlackList){ public static void removeListFromListslist(String ListName, String BlackList){
String Lists[] = getListslistArray(ListName); String[] Lists = getListslistArray(ListName);
String temp = ""; String temp = "";
for(int i=0;i <= Lists.length -1;i++){ for(int i=0;i <= Lists.length -1;i++){
@ -93,7 +93,7 @@ public class listManager {
//add a new List to a List-List //add a new List to a List-List
public static void addListToListslist(String ListName, String newList){ public static void addListToListslist(String ListName, String newList){
String Lists[] = getListslistArray(ListName); String[] Lists = getListslistArray(ListName);
String temp = ""; String temp = "";
for(int i = 0;i <= (Lists.length -1); i++){ for(int i = 0;i <= (Lists.length -1); i++){
@ -105,7 +105,7 @@ public class listManager {
//returns true, if the Lists-List contains the Listname //returns true, if the Lists-List contains the Listname
public static boolean ListInListslist(String Listname, String BlackList){ public static boolean ListInListslist(String Listname, String BlackList){
String Lists[] = getListslistArray(Listname); String[] Lists = getListslistArray(Listname);
for(int u=0;u <= Lists.length -1;u++){ for(int u=0;u <= Lists.length -1;u++){
if( BlackList.equals(Lists[u]) ){ if( BlackList.equals(Lists[u]) ){

@ -260,7 +260,7 @@ public class ftpc {
private static String[] shift(String args[]) { private static String[] shift(String args[]) {
if ((args == null) || (args.length == 0)) return args; else { if ((args == null) || (args.length == 0)) return args; else {
String newArgs[] = new String[args.length-1]; String[] newArgs = new String[args.length-1];
System.arraycopy(args, 1, newArgs, 0, args.length-1); System.arraycopy(args, 1, newArgs, 0, args.length-1);
return newArgs; return newArgs;
} }
@ -301,13 +301,13 @@ public class ftpc {
private void javaexec(String[] inArgs) { private void javaexec(String[] inArgs) {
String obj = inArgs[0]; String obj = inArgs[0];
String args[] = new String[inArgs.length-1]; String[] args = new String[inArgs.length-1];
// remove the object name from the array of arguments // remove the object name from the array of arguments
System.arraycopy(inArgs, 1, args, 0, inArgs.length-1); System.arraycopy(inArgs, 1, args, 0, inArgs.length-1);
// Build the argument list for invoke() method. // Build the argument list for invoke() method.
Object argList[] = new Object[1]; Object[] argList = new Object[1];
argList[0] = args; argList[0] = args;
Properties pr = System.getProperties(); Properties pr = System.getProperties();
@ -1557,7 +1557,7 @@ cd ..
byte[] Bytes = serverCore.publicIP().getBytes(); byte[] Bytes = serverCore.publicIP().getBytes();
// bytes greater than 127 should not be printed as negative // bytes greater than 127 should not be printed as negative
short Shorts[] = new short[4]; short[] Shorts = new short[4];
for (int i = 0; i < 4; i++) { for (int i = 0; i < 4; i++) {
Shorts[i] = Bytes[i]; Shorts[i] = Bytes[i];
if (Shorts[i] < 0) Shorts[i] += 256; if (Shorts[i] < 0) Shorts[i] += 256;
@ -1653,7 +1653,7 @@ cd ..
outFile = new RandomAccessFile(fileDest, "rw"); outFile = new RandomAccessFile(fileDest, "rw");
// write remote file to local file // write remote file to local file
byte block[] = new byte[blockSize]; byte[] block = new byte[blockSize];
int numRead; int numRead;
long length = 0; long length = 0;
@ -1718,7 +1718,7 @@ cd ..
RandomAccessFile inFile = new RandomAccessFile(fileName, "r"); RandomAccessFile inFile = new RandomAccessFile(fileName, "r");
// write remote file to local file // write remote file to local file
byte block[] = new byte[blockSize]; byte[] block = new byte[blockSize];
int numRead; int numRead;
while ((numRead = inFile.read(block)) >= 0) { while ((numRead = inFile.read(block)) >= 0) {

@ -150,7 +150,7 @@ public class GuiHandler extends Handler{
*/ */
public synchronized LogRecord[] getLogArray() { public synchronized LogRecord[] getLogArray() {
LogRecord tempBuffer[] = new LogRecord[this.count]; LogRecord[] tempBuffer = new LogRecord[this.count];
for (int i = 0; i < this.count; i++) { for (int i = 0; i < this.count; i++) {
int ix = (this.start+i)%this.buffer.length; int ix = (this.start+i)%this.buffer.length;

@ -112,7 +112,7 @@ public final class serverByteBuffer extends OutputStream {
try { try {
FileInputStream fis = new FileInputStream(f); FileInputStream fis = new FileInputStream(f);
// byte buf[] = new byte[512]; // byte[] buf = new byte[512];
// int p = 0; // int p = 0;
int l; int l;
// while ((l = fis.read(buf)) > 0) { // while ((l = fis.read(buf)) > 0) {
@ -338,7 +338,7 @@ public final class serverByteBuffer extends OutputStream {
} }
public byte toByteArray()[] { public byte toByteArray()[] {
byte newbuf[] = new byte[this.length]; byte[] newbuf = new byte[this.length];
System.arraycopy(this.buffer, 0, newbuf, 0, this.length); System.arraycopy(this.buffer, 0, newbuf, 0, this.length);
return newbuf; return newbuf;
} }

@ -247,7 +247,7 @@ public final class serverCodings {
MessageDigest digest = MessageDigest.getInstance("MD5"); MessageDigest digest = MessageDigest.getInstance("MD5");
digest.reset(); digest.reset();
InputStream in = new BufferedInputStream(new FileInputStream(file), 2048); InputStream in = new BufferedInputStream(new FileInputStream(file), 2048);
byte buf [] = new byte[2048]; byte[] buf = new byte[2048];
int n; int n;
while ((n = in.read(buf)) > 0) digest.update(buf, 0, n); while ((n = in.read(buf)) > 0) digest.update(buf, 0, n);
in.close(); in.close();

@ -362,7 +362,7 @@ public class cryptbig {
private static void copy(OutputStream out, InputStream in, int bufferSize) throws IOException { private static void copy(OutputStream out, InputStream in, int bufferSize) throws IOException {
InputStream bIn = new BufferedInputStream(in, bufferSize); InputStream bIn = new BufferedInputStream(in, bufferSize);
OutputStream bOut = new BufferedOutputStream(out, bufferSize); OutputStream bOut = new BufferedOutputStream(out, bufferSize);
byte buf [] = new byte[bufferSize]; byte[] buf = new byte[bufferSize];
int n; int n;
while ((n = bIn.read(buf)) > 0) bOut.write(buf, 0, n); while ((n = bIn.read(buf)) > 0) bOut.write(buf, 0, n);
bIn.close(); bIn.close();

@ -115,7 +115,7 @@ public class gzip {
private static void copy(OutputStream out, InputStream in, int bufferSize) throws IOException { private static void copy(OutputStream out, InputStream in, int bufferSize) throws IOException {
InputStream bIn = new BufferedInputStream(in, bufferSize); InputStream bIn = new BufferedInputStream(in, bufferSize);
OutputStream bOut = new BufferedOutputStream(out, bufferSize); OutputStream bOut = new BufferedOutputStream(out, bufferSize);
byte buf [] = new byte[bufferSize]; byte[] buf = new byte[bufferSize];
int n; int n;
while ((n = bIn.read(buf)) > 0) bOut.write(buf, 0, n); while ((n = bIn.read(buf)) > 0) bOut.write(buf, 0, n);
bIn.close(); bIn.close();

@ -344,7 +344,7 @@ public class yacyClient {
// create containers // create containers
int words = wordhashes.length() / plasmaWordIndexEntry.wordHashLength; int words = wordhashes.length() / plasmaWordIndexEntry.wordHashLength;
plasmaWordIndexEntryContainer container[] = new plasmaWordIndexEntryContainer[words]; plasmaWordIndexEntryContainer[] container = new plasmaWordIndexEntryContainer[words];
for (int i = 0; i < words; i++) { for (int i = 0; i < words; i++) {
container[i] = new plasmaWordIndexEntryContainer(wordhashes.substring(i * plasmaWordIndexEntry.wordHashLength, (i + 1) * plasmaWordIndexEntry.wordHashLength)); container[i] = new plasmaWordIndexEntryContainer(wordhashes.substring(i * plasmaWordIndexEntry.wordHashLength, (i + 1) * plasmaWordIndexEntry.wordHashLength));
} }

Loading…
Cancel
Save