Results 1 to 1 of 1
Thread: Adding print streams
- 04-21-2012, 07:44 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 53
- Rep Power
- 0
Adding print streams
Hello, im working on a program, however i have a need to have 2 print streams and i wish to add the contents of one to another
The problem is i cant declare writer 2 without giving it a file url the same as newwriter, so basically i end up with 2 files when i only really want one, but it is required of me to maintain both streams. Any ideas?Java Code:private static PrintStream newwriter; private static PrintStream writer2; newwriter = new PrintStream("test.txt"); writer2 = new PrintStream(); // dont want a new file output, just need the stream //what i want to do writer2.append("test sentence"); newwriter.print(writer2);Last edited by trishtren; 04-21-2012 at 07:56 PM.
Similar Threads
-
Cmd process streams
By helloworld922 in forum Advanced JavaReplies: 0Last Post: 10-20-2010, 08:20 AM -
Print the text file and print preview them
By Java Tip in forum java.awtReplies: 0Last Post: 06-22-2008, 11:04 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks