Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to seek start and end pointers without reading a file  RSS feed

 
vijay mahendra
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi one and all,

I want to replace text between start and end pointer in a File.
But without reading a file.File size is big.it takes more time.
So i want to replace text with new data between start and end pointers without reading file.
is there any way to do ?
please let me know .
Thanks in Advance.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
vijay:
So i want to replace text with new data between start and end pointers without reading file.


No.
 
Rob Spoor
Sheriff
Posts: 21088
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can with RandomAccessFile, but keep in mind that you will be working with bytes, not characters.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think with RandomAccessFile you can only replace N bytes by another N bytes, not by M bytes. Just something to keep in mind.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!