1
2
3
4
5
6
7
8
9
10
11
12
13 package org.astrogrid.applications.apps.tables;
14
15 import java.io.IOException;
16 import java.io.InputStream;
17
18 import uk.ac.starlink.util.DataSource;
19
20 /***
21 * A simple Datasource object that can be created from a standard stream. Exists because we have streams already created in CEA framework and all the standard STIL datasources take files/urls etc....
22 * @author Paul Harrison (pah@jb.man.ac.uk) 09-Nov-2004
23 * @version $Name: HEAD $
24 * @since iteration6
25 */
26 public class StreamDataSource extends DataSource {
27
28 protected InputStream originalStream;
29 /***
30 *
31 */
32 public StreamDataSource(InputStream stream) {
33 originalStream = stream;
34 }
35
36
37
38
39 protected InputStream getRawInputStream() throws IOException {
40 return originalStream;
41 }
42
43 }