예제 #1
0
파일: Env.java 프로젝트: NathanEEvans/api
 SourceCode(String fileName, BufferedReader reader) throws IOException {
   this.fileName = fileName;
   try {
     String line = reader.readLine();
     while (line != null) {
       sourceLines.add(line);
       line = reader.readLine();
     }
   } finally {
     reader.close();
   }
 }
예제 #2
0
파일: VMConnection.java 프로젝트: 9r3y/c47
 private void dumpStream(InputStream stream) throws IOException {
   BufferedReader in = new BufferedReader(new InputStreamReader(stream));
   int i;
   try {
     while ((i = in.read()) != -1) {
       MessageOutput.printDirect((char) i); // Special case: use
       //   printDirect()
     }
   } catch (IOException ex) {
     String s = ex.getMessage();
     if (!s.startsWith("Bad file number")) {
       throw ex;
     }
     // else we got a Bad file number IOException which just means
     // that the debuggee has gone away.  We'll just treat it the
     // same as if we got an EOF.
   }
 }