Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #22730
| X-Received | by 10.224.213.197 with SMTP id gx5mr17474374qab.8.1362511238221; Tue, 05 Mar 2013 11:20:38 -0800 (PST) |
|---|---|
| X-Received | by 10.49.25.13 with SMTP id y13mr2119125qef.2.1362511238179; Tue, 05 Mar 2013 11:20:38 -0800 (PST) |
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!t2no9104234qal.0!news-out.google.com!q17ni604qal.0!nntp.google.com!dd2no7269920qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail |
| Newsgroups | comp.lang.java.programmer |
| Date | Tue, 5 Mar 2013 11:20:38 -0800 (PST) |
| In-Reply-To | <026b0609-ef87-470e-b899-fc00529bb4ce@googlegroups.com> |
| Complaints-To | groups-abuse@google.com |
| Injection-Info | glegroupsg2000goo.googlegroups.com; posting-host=188.155.87.251; posting-account=UdjKVQkAAADdwjjAc7pI5-Sjpc8eLCsJ |
| NNTP-Posting-Host | 188.155.87.251 |
| References | <026b0609-ef87-470e-b899-fc00529bb4ce@googlegroups.com> |
| User-Agent | G2/1.0 |
| MIME-Version | 1.0 |
| Message-ID | <629a4687-24e7-49cc-b8b0-e7f91fbf79bd@googlegroups.com> (permalink) |
| Subject | Re: hello here is a copy of a copy program on the net . |
| From | giovannich1965@gmail.com |
| Injection-Date | Tue, 05 Mar 2013 19:20:38 +0000 |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| Xref | csiph.com comp.lang.java.programmer:22730 |
Show key headers only | View raw
thank you
display is just a control to see if read
but if I wanted to see how hexaa instead of decimal?
And how to change the value read
for example by inverting the value?
b [i] = - (b [i]);
Le mardi 5 mars 2013 17:44:01 UTC+1, giovann...@gmail.com a écrit :
> .. but I can not see a byte that download ...
>
> it displays this: [B @ 1f33675
>
> continuously .... until the end
>
>
>
> if you can help me thank you ...
>
>
>
> package fichier;
>
>
>
> import java.io.FileNotFoundException;
>
> import java.io.FileInputStream;
>
> import java.io.FileOutputStream;
>
> import java.io.IOException;
>
>
>
>
>
> public class fichier {
>
>
>
> public static void main(String[] args) {
>
>
>
> String strSourceFile="C:/temp/demo.txt";
>
> String strDestinationFile="C:/temp/demo2.txt";
>
>
>
> try
>
> {
>
> //create FileInputStream object for source file
>
> FileInputStream fin = new FileInputStream(strSourceFile);
>
>
>
> //create FileOutputStream object for destination file
>
> FileOutputStream fout = new FileOutputStream(strDestinationFile);
>
>
>
> byte[] b = new byte[2];
>
> int noOfBytes = 0;
>
>
>
> System.out.println("Copying file using streams");
>
>
>
> //read bytes from source file and write to destination file
>
> while( (noOfBytes = fin.read(b)) != -1 )
>
> {
>
> System.out.println(b);
>
> fout.write(b, 0, noOfBytes);
>
> }
>
>
>
> System.out.println("File copied!");
>
>
>
> //close the streams
>
> fin.close();
>
> fout.close();
>
>
>
> }
>
> catch(FileNotFoundException fnf)
>
> {
>
> System.out.println("Specified file not found :" + fnf);
>
> }
>
> catch(IOException ioe)
>
> {
>
> System.out.println("Error while copying file :" + ioe);
>
> }
>
> }
>
> }
>
>
>
> /*
>
> Typical output would be
>
> Copying file using streams
>
> File copied!
>
> */
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
hello here is a copy of a copy program on the net . giovannich1965@gmail.com - 2013-03-05 08:44 -0800
Re: hello here is a copy of a copy program on the net . "John B. Matthews" <nospam@nospam.invalid> - 2013-03-05 11:56 -0500
Re: hello here is a copy of a copy program on the net . Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-03-05 12:01 -0500
Re: hello here is a copy of a copy program on the net . giovannich1965@gmail.com - 2013-03-05 11:20 -0800
Re: hello here is a copy of a copy program on the net . Lew <lewbloch@gmail.com> - 2013-03-05 15:50 -0800
Re: hello here is a copy of a copy program on the net . giovannich1965@gmail.com - 2013-03-05 11:21 -0800
Re: hello here is a copy of a copy program on the net . giovannich1965@gmail.com - 2013-03-06 12:40 -0800
csiph-web