Mercurial > repos > rliterman > csp2
comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/opt/bbmap-39.01-1/current/fileIO/OpenFile.java @ 68:5028fdace37b
planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author | jpayne |
---|---|
date | Tue, 18 Mar 2025 16:23:26 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
67:0e9998148a16 | 68:5028fdace37b |
---|---|
1 package fileIO; | |
2 | |
3 import java.io.IOException; | |
4 import java.io.InputStream; | |
5 | |
6 public class OpenFile { | |
7 | |
8 public static void main(String[] args){ | |
9 InputStream is=ReadWrite.getRawInputStream(args[0], false); | |
10 byte[] line=new byte[100]; | |
11 try { | |
12 int r=is.read(line, 0, 100); | |
13 if(r>0){ | |
14 System.err.println("'"+new String(line, 0, r)+"'"); | |
15 } | |
16 } catch (IOException e) { | |
17 // TODO Auto-generated catch block | |
18 e.printStackTrace(); | |
19 } | |
20 try { | |
21 is.close(); | |
22 } catch (IOException e) { | |
23 // TODO Auto-generated catch block | |
24 e.printStackTrace(); | |
25 } | |
26 } | |
27 | |
28 } |