Rename pimstuff -> jpim and move to Maven
[jpim.git] / src / main / java / de / j32 / httplib / HttpResponse.java
diff --git a/src/main/java/de/j32/httplib/HttpResponse.java b/src/main/java/de/j32/httplib/HttpResponse.java
new file mode 100644 (file)
index 0000000..b1dfb77
--- /dev/null
@@ -0,0 +1,30 @@
+package de.j32.httplib;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+
+public class HttpResponse extends InputStream
+{
+    HttpURLConnection connection_;
+    InputStream stream_;
+
+    public HttpResponse(HttpURLConnection connection) throws IOException
+    {
+        connection_ = connection;
+        stream_ = connection_.getInputStream();
+    }
+
+    @Override
+    public int read() throws IOException
+    {
+        return stream_.read();
+    }
+
+    @Override
+    public void close() throws IOException
+    {
+        stream_.close();
+    }
+
+}