Rogerio,

You could set the file's contents to a StringBuffer.  Then use the
sb.setLength() method to set it to your desired length.  Of course, all
that left is to write the newly truncated contents of the StringBuffer back
out to the file.

By the way, setting it to "0" gives you an empty StringBuffer again.

Regards,
Trenton

At 02:04 PM 3/12/99 -0300, you wrote:
>Is there a way to truncate a file, say, reduce it's length by x bytes?
>
>[]'s
>Rog�rio Gatto

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to