[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Handle-info] net.handle.apps.simple.HDLDelete source question
Hello,
trying to get some services to work I have to take a closer look to the
source code. I wonder if my understanding is right that in the code
snippet below the keys file contents is read twice into the key byte
array?
net.handle.apps.simple.HDLDelete:
----------------------------------------------------
byte[] key = null;
try {
File f = new File(argv[1]);
FileInputStream fs = new FileInputStream(f);
key = new byte[(int)f.length()];
// first ----------->
int n=0;
while(n<key.length) key[n++] = (byte)fs.read();
// the same once more ? ----------->
fs.read(key);
} catch (Throwable t) {
System.err.println("Cannot read private key " + argv[1] + ": " +
t);
System.exit(-1);
}
----------------------------------------------------
--
Konstantin Rekk
VZG (GBV), Göttingen, Berlin
0176 2100 6000
030 29003511
skype: krekk1970
rekk@gbv.de
http://www.gbv.de
_______________________________________________
Handle-Info mailing list
Handle-Info@cnri.reston.va.us
http://www.handle.net/mailman/listinfo/handle-info