chunkproblem
This commit is contained in:
parent
2e55467ba1
commit
fe23c1a6af
@ -240,24 +240,9 @@ public class UDPHandler implements Runnable {
|
||||
data = parts[1];
|
||||
|
||||
if (data.charAt(data.length()) == '!') { // last chunk
|
||||
// file zusammensetzen und im zielnode speichern
|
||||
File file = new File("fileID");
|
||||
FileWriter fw;
|
||||
try {
|
||||
|
||||
fw = new FileWriter(file);
|
||||
for (int i = 0; i < tempData.length; i++) {
|
||||
fw.write(tempData[i]);
|
||||
}
|
||||
fw.flush();
|
||||
|
||||
// store file in node
|
||||
node.storeFile(file);
|
||||
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
// store file in node
|
||||
//TODO: how to store chunks as FILE?
|
||||
node.storeFile(tempData);
|
||||
|
||||
} else {
|
||||
tempData[chunkID] = data;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user