1 package fr.in2p3.jsaga.impl.job.instance.stream;
2
3 import org.ogf.saga.error.*;
4
5 import java.io.IOException;
6 import java.io.InputStream;
7
8
9
10
11
12
13
14
15
16
17
18
19
20 public class GetterInputStream extends Stdout {
21 private GetterBufferedInputStream m_buffer;
22 private InputStream m_stream;
23
24 public GetterInputStream(InputStream stdout) throws NotImplementedException, DoesNotExistException, TimeoutException, NoSuccessException {
25 m_buffer = new GetterBufferedInputStream(stdout);
26 m_stream = stdout;
27 }
28
29 public void closeJobIOHandler() throws PermissionDeniedException, TimeoutException, NoSuccessException {
30
31 }
32
33
34
35 public int read() throws IOException {return this.stream().read();}
36 public int read(byte[] b) throws IOException {return this.stream().read(b);}
37 public int read(byte[] b, int off, int len) throws IOException {return this.stream().read(b, off, len);}
38 public long skip(long n) throws IOException {return this.stream().skip(n);}
39 public void close() throws IOException {this.stream().close();}
40
41
42
43 private InputStream stream() throws IOException {
44
45 return m_buffer;
46 }
47 }