Revision 5069
Added by ben leinfelder about 15 years ago
src/edu/ucsb/nceas/metacat/client/MetacatClient.java | ||
---|---|---|
61 | 61 |
|
62 | 62 |
public static void main(String[] args) { |
63 | 63 |
try { |
64 |
MetacatClient mc = (MetacatClient) MetacatFactory.createMetacatConnection("http://fred.msi.ucsb.edu:8080/knb/metacat"); |
|
65 |
//InputStream r = mc.read("zip.1.1"); |
|
66 |
InputStream r = mc.read("jlee.2808.2"); |
|
64 |
Metacat mc = |
|
65 |
MetacatFactory.createMetacatConnection(args[0]); |
|
67 | 66 |
|
68 |
//FileOutputStream fos = new FileOutputStream("test.zip");
|
|
69 |
FileOutputStream fos = new FileOutputStream("jlee.xml");
|
|
70 |
BufferedOutputStream bfos = new BufferedOutputStream(fos);
|
|
67 |
InputStream r = mc.read(args[1]);
|
|
68 |
FileOutputStream fos = new FileOutputStream(args[2]);
|
|
69 |
BufferedOutputStream bfos = new BufferedOutputStream(fos);
|
|
71 | 70 |
|
72 | 71 |
int c = r.read(); |
73 | 72 |
while(c != -1) |
Also available in: Unified diff
use arguments for the main() method - hardcoded URLs and test docids are poor form