How much big a line of a text file can be?
Hi there
I want to write to a text file in Java but lets say that I want each line of that text file being really big.(ex 100000 characters) I just want to ask if there is any restriction of doing that. Thanks |
The file doesn't know or care what the bytes in it represent. Only the applications that read it will be influenced by it's format. As long as the overall file size falls within the limits for the filesystem type, it makes no difference.
--- rod. |
Quote:
|
fyi: my aix machine gets mad when i try to open a file in vi with more than 2048 chars per line.
|
You wouldn't have that problem with emacs!
|
Look at "getconf LINE_MAX".
|
this is weird:
Code:
schneidz@aix-lq> emacs Code:
schneidz@aix-lq> getconf LINE_MAX |
Quote:
|
unfortunately, it's not my computer.
i work in a large corporation and they don't allow much open software. |
Java has no restriction on a line length, outside the fact the line has to fit in the available memory.
You may need to increase the maximum memory allocatable by the JVM with the -Xmx option (eg. "java -Xmx1024m" for 1 GB heap). |
All times are GMT -5. The time now is 07:08 PM. |