File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is the most optimized way of writing a file

 
Biren shah
Ranch Hand
Posts: 107
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends,
i do write a file..and some times read them also.
i want a tutorial or way of writing the file in most optimized way
 
Joe Ess
Bartender
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java Platform Performance has a chapter on IO. Be aware that there is no one answer to your question. It depends on a large number of factors.
 
Biren shah
Ranch Hand
Posts: 107
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Ess
this will really help
 
Biren shah
Ranch Hand
Posts: 107
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Ess
this will really help
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the faster way to access a file (read/write) is using the java.nio.MappedByteBuffer obtained from a FileChannel.

For instance:



It is the most direct way to access the file and therefore should be the faster.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic