Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > it.comp.java > #9239

Re: Aggiungere testo a un file

From "CarMas" <carmas@jpknet.com>
Newsgroups it.comp.java
Subject Re: Aggiungere testo a un file
Date 2017-07-24 12:53 +0200
Organization Aioe.org NNTP Server
Message-ID <ol4jiu$13jf$1@gioia.aioe.org> (permalink)
References <okl4c9$vqa$1@gioia.aioe.org>

Show all headers | View raw


"Oliviero"  ha scritto nel messaggio news:okl4c9$vqa$1@gioia.aioe.org...

> Ho aperto un file di testo in scrittura con le seguenti istruzioni:
> File f;
> FileWriter fw;
> PrintWriter writer;
> come posso fare per scrivere testo sul file partendo dal fondo?

Immagino che hai aperto il FileWriter col File. Se guardi bene, FileWriter 
ha altri costruttori, per esempio:
FileWriter(File file, boolean append)
se usi questo, fa quello che vuoi fare tu (quoto la documentazione: If the 
second argument is true, then bytes will be written to the end of the file 
rather than the beginning).

Saluti
CarMas

Back to it.comp.java | Previous | NextPrevious in thread | Find similar


Thread

Aggiungere testo a un file Oliviero <abcxyz@micso.net> - 2017-07-18 16:01 +0200
  Re: Aggiungere testo a un file Jack <jack4747@gmail.com> - 2017-07-18 07:18 -0700
  Re: Aggiungere testo a un file "CarMas" <carmas@jpknet.com> - 2017-07-24 12:53 +0200

csiph-web