I am working in java
my goal is that I have to read from a file and at the same time I have to append that file by another code
it will be like an executable abc will be reading file ‘myfile.txt’ and another executable xyz will appending ‘myfile.txt’.
Is it possible , what concept I should apply to get it work .
*I read somewhere that it depends on OS then while working on android AVD will it be possible ? *
I am working in java my goal is that I have to read from
Share
It is theoretically possible to do that, though not particularly efficiently. For example, you can implement this kind of thing using the Apache Commons
Tailerclass.However, I can’t help thinking that you would be better off using a “pipe” that one application writes to and the next one reads from. Since Android has Linux underneath, there should be a way to create and use pipes.
And if you want to do this within a single Android application, you can use Java intra-process pipes; e.g.
PipedInputStreamandPipedOutputStream.