I'm just wondering if its possible in java to write a character to a file on a specific line and column position?
I am writing a program to deal with stocks and Renko graphs, I can already interpret the input data and turn it into a string of one's and zero's. Where a 1 represents a move up and a 0 a move down. I just want to write this into a file using the "|" character to represent a Renko block.
For example if I had the string : 01011 I want to get the file to look like this:
|
| |
| |
I just don't know if there is a way to write on a specific line. Is what I want even possible? Any help is appreciated.
No there is no easy way to insert a character into textfile at given position. But is it really necessary?
Why don't you model your "drawing area" as a two-dimensional character array with a fixed height and width and prefilled with spaces? With this it is easy to put a character at a certain position. And when you are done with "drawing" you can write the contents of your two-dimensional array into a text file character by character.