Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hello, I have a problem... Th

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,

I have a problem...

The folowing code dont's work

String strOut = "test of stream";
String paht = "C:\\tmp\\test.log";

InputStream Entrada = System.in;
OutputStream Saida = System.out;

File fileLog = new File(path);
byte vectorbytes[] = new byte[1000];
vectorbytes = strOut.getBytes();

int sizebytes = Entrada.read(vectorbytes);
Saida.write(vectorbytes,0,sizebytes);
Saida = new FileOutputStream(fileLog);

Entrada.close();
Saida.close();

Exist any error?


Thanks and advance

Alan Brandt.
 

This problem is solved.

Thanks Koldark...

but, exist another question

As I make to catch the date and hour of the system?
to form the name of LOG archives


I am using:
Calendar call = Calendar.getInstance();
String date = String.valueOf(call.DATE);
String hour = String.valeuOf(call.HOUR);
.....
...
..
.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top