KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > framework > internal > core > BundleSource


1 /*******************************************************************************
2  * Copyright (c) 2003, 2005 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11
12 package org.eclipse.osgi.framework.internal.core;
13
14 import java.io.IOException JavaDoc;
15 import java.io.InputStream JavaDoc;
16 import java.net.URLConnection JavaDoc;
17
18 /**
19  * BundleSource class to wrap in InputStream.
20  *
21  * <p>This class implements a URLConnection which
22  * wraps an InputStream.
23  */

24 public class BundleSource extends URLConnection JavaDoc {
25     private InputStream JavaDoc in;
26
27     protected BundleSource(InputStream JavaDoc in) {
28         super(null);
29         this.in = in;
30     }
31
32     public void connect() throws IOException JavaDoc {
33         connected = true;
34     }
35
36     public InputStream JavaDoc getInputStream() throws IOException JavaDoc {
37         return (in);
38     }
39 }
40
Popular Tags