I need to download/upload huge text file but when I've line with length more than 4096 characters, the line is cut and a !_NEWLINE_! (return)is inserted
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   chang_jack
Posted On:   Friday, June 28, 2002 02:26 AM

I need to download/upload huge text file but when I've line with length more than 4096, the line is cut and a (return) char is inserted. I've change the size of byte[] to 265536 but it don't change anything. Is there any other way to download/upload huge text file without cutting lines every 4096 characters ? Thanks !!! the source : FormFile file = theForm.getTheFile(); String fileName= file.getFileName(); String contentType = file.getContentType(); String writeFile = file.getFileName(); String size = (file.getFileSize() + " bytes"); InputStream is = file.getInputStream(); // Source from browser IE OutputStream os = new FileOutputStream   More>>

I need to download/upload huge text file but when I've line with length more than 4096, the line is cut and a
(return) char is inserted. I've change the size of byte[] to 265536 but it don't change anything. Is there any other way to download/upload huge text file without cutting lines every 4096 characters ? Thanks !!! the source :



FormFile file = theForm.getTheFile();


String fileName= file.getFileName();


String contentType = file.getContentType();


String writeFile = file.getFileName(); String size = (file.getFileSize() + " bytes");


InputStream is = file.getInputStream(); // Source from browser IE


OutputStream os = new FileOutputStream(fileName); // Destination to the server


byte b[] = new byte[265536];


int c;


while ((c = is.read(b, 0, 265536)) != -1)
os.write(b, 0, c); os.close() ;

   <<Less
About | Sitemap | Contact