Mercurial > repos > rliterman > csp2
view 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 |
line wrap: on
line source
package fileIO; import java.io.IOException; import java.io.InputStream; public class OpenFile { public static void main(String[] args){ InputStream is=ReadWrite.getRawInputStream(args[0], false); byte[] line=new byte[100]; try { int r=is.read(line, 0, 100); if(r>0){ System.err.println("'"+new String(line, 0, r)+"'"); } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } try { is.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }