dcsimg
priting through java.io.FileOutputStream.
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   prashant_R
Posted On:   Wednesday, June 13, 2007 03:15 AM

Dear all i am trying print some string using FileoutputStream by System.out.println("b4 the stream"); FileOutputStream fos = new FileOutputStream(printerName,false); System.out.println("going to get Buffer the stream"); BufferedWriter bfw =new BufferedWriter( new OutputStreamWriter(fos)); System.out.println("Got the stream"); bfw.write("Hi to Printer ur a good boy"); bfw.close(); fos.close(); i am getting the exception java.io.FileNotFoundException: // /printer name (Access is denied) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.    More>>

Dear all

i am trying print some string using FileoutputStream


by
System.out.println("b4 the stream");
FileOutputStream fos = new FileOutputStream(printerName,false);
System.out.println("going to get Buffer the stream");
BufferedWriter bfw =new BufferedWriter( new OutputStreamWriter(fos));
System.out.println("Got the stream");

bfw.write("Hi to Printer ur a good boy");
bfw.close();
fos.close();



i am getting the exception
java.io.FileNotFoundException: // /printer name (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream. (Unknown Source)
at java.io.FileOutputStream. (Unknown Source)
at testPrint.main(testPrint.java:26)
Exception in Mainjava.io.FileNotFoundException: // /printer (Access is denied


kindly resolve my problem


regards
Prashant .R

   <<Less
About | Sitemap | Contact