• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to split file into several parts while using my own method similar to split() of java api ?  RSS feed

 
barlet south
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have done one application in java which do same operations over the file. Actually what my application do is just perform a threshold scheme (n,k) for a file. This is working perfectly but i am able to understand it because of i use System.out.println () method . What i actually i want to do is just to really split the file . For example if i have file myfile.txt and i use threshold scheme(7,3) i really want to split my file into 7 parts like myfile.txt1 , myfile.txt2 and so on . What i really have done till now is :



This really works good . For example if i have one file let say just for demonstration 11 byte . for first byte we will have 7 value for second byte 7 values and so on. Now i am really struggled of how to really use this method which split the file in order to really split my file which i have into my desktop into seven parts. In other words i want this method i have here to do something similar with split() method which is in java api.

Thanks in advance
 
Knute Snortum
Sheriff
Posts: 4087
112
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If what you're wanting is a way to read a file a byte at a time, take a look at Byte Streams.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!