Get EOF character

M

Manish Hatwalne

I sit possible to get an EOF character for a plain text file (^Z etc) in my
Java code using some system property (something like "file.separator").
I know how to read file, but I need this EOF character for some other
purpose. How can I get this?

TIA,
- Manish
 
C

Carl Howells

Manish said:
I sit possible to get an EOF character for a plain text file (^Z etc) in my
Java code using some system property (something like "file.separator").
I know how to read file, but I need this EOF character for some other
purpose. How can I get this?

TIA,
- Manish

There's no such thing as an EOF character. The end of a file isn't
marked by any kind of special character. The end of the file is
determined by the entry in the file system that stores the length of the
file.

You'll have to find a different way to solve the problem. Do you want
multiple files? Do you want a single file with multiple sections?
 
M

Manish Hatwalne

BTW, I tried this and found that there's no system property as such, is
there any other way of getting it?
System.getProperties().list(System.out);

TIA,
- Manish
 
R

Roedy Green

I sit possible to get an EOF character for a plain text file (^Z etc) in my
Java code using some system property (something like "file.separator").
I know how to read file, but I need this EOF character for some other
purpose. How can I get this?

public static final char EOF = (char)26;
 
R

Roedy Green

BTW, I tried this and found that there's no system property as such, is
there any other way of getting it?
System.getProperties().list(System.out);

the EOF character has no special meaning in Java. It did in CPM and
sometimes in DOS, but generally it is not used anymore. The OS tracks
the exact length of a file and puts no marker character in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top