1 19 20 package org.netbeans.core.execution; 21 22 import java.io.IOException ; 23 import java.io.InputStream ; 24 25 30 final class SysIn extends InputStream { 31 32 public SysIn() { 33 } 34 35 36 public int read() throws IOException { 37 return ExecutionEngine.getTaskIOs().getIn().read (); 38 } 39 40 41 public int read(byte[] b, int off, final int len) throws IOException { 42 char[] b2 = new char[len]; 43 int ret = ExecutionEngine.getTaskIOs().getIn().read(b2, 0, len); 44 for (int i = 0; i < len; i++) { 45 b[off + i] = (byte) b2[i]; 46 } 47 return ret; 48 } 49 50 51 public void close() throws IOException { 52 ExecutionEngine.getTaskIOs().getIn().close(); 53 } 54 55 56 public void mark(int x) { 57 try { 58 ExecutionEngine.getTaskIOs().getIn().mark(x); 59 } catch (IOException e) { 60 } 62 } 63 64 65 public void reset() throws IOException { 66 ExecutionEngine.getTaskIOs().getIn().reset(); 67 } 68 69 72 public boolean markSupported() { 73 return ExecutionEngine.getTaskIOs().getIn().markSupported(); 74 } 75 76 79 public long skip(long l) throws IOException { 80 return ExecutionEngine.getTaskIOs().getIn().skip(l); 81 } 82 } 83 | Popular Tags |