InputStream input;
OutputStream out = new FileOutputStream("file location");
int read=0;
input = registry.get(Path).getContentStream();
byte[] bytes = new byte[1024];
while((read = input.read(bytes))!= -1){
out.write(bytes, 0, read);
out.write( '\n' );
}
input.close();
out.flush();
out.close();
System.out.println("New file created!");
OutputStream out = new FileOutputStream("file location");
int read=0;
input = registry.get(Path).getContentStream();
byte[] bytes = new byte[1024];
while((read = input.read(bytes))!= -1){
out.write(bytes, 0, read);
out.write( '\n' );
}
input.close();
out.flush();
out.close();
System.out.println("New file created!");
Comments
Post a Comment