CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 15 of 17

Threaded View

  1. #5
    Join Date
    Sep 2011
    Posts
    197

    Re: NullPointer/warnings

    I was going to say that exact thing keang +D. Just because, the board instructions call for me to do so.
    my solution:
    Code:
               public static void readOutput() throws IOException{
        String allTxt;
        int cap;
        int read;
          try 
        (BufferedReader br = new BufferedReader(new FileReader(file))) {
              allTxt = br.readLine();
               cap = allTxt.length();
    if(allTxt != null) {
      CharArrayWriter caw = new CharArrayWriter(cap);
        caw.write(allTxt, 0, cap);
      char[] araFull = caw.toCharArray();
     // code continues
    Last edited by kolt007; November 1st, 2011 at 01:14 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured