]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.osgi/src/org/simantics/scl/osgi/internal/BundleDocumentationSource.java
Fixed all line endings of the repository
[simantics/platform.git] / bundles / org.simantics.scl.osgi / src / org / simantics / scl / osgi / internal / BundleDocumentationSource.java
index 1491b76b82fb72ef993394c163b40febe657a4e8..47db3927fce3442de4cc54e4807e2d303ac26db7 100644 (file)
@@ -1,48 +1,48 @@
-package org.simantics.scl.osgi.internal;\r
-\r
-import java.io.IOException;\r
-import java.io.InputStream;\r
-import java.net.URL;\r
-import java.nio.charset.Charset;\r
-import java.util.Arrays;\r
-\r
-import org.osgi.framework.Bundle;\r
-\r
-public class BundleDocumentationSource {\r
-    public static final Charset UTF8 = Charset.forName("UTF-8");  \r
-    \r
-    public final String documentationName;\r
-    public final Bundle bundle;\r
-    public final URL url;\r
-    \r
-    public BundleDocumentationSource(String documentationName, Bundle bundle,\r
-            URL url) {\r
-        this.documentationName = documentationName;\r
-        this.bundle = bundle;\r
-        this.url = url;\r
-    }\r
-\r
-    public String getText() {\r
-        try {\r
-            InputStream stream = url.openStream();\r
-            try {\r
-                byte[] buffer = new byte[1024];\r
-                int pos = 0;\r
-                while(true) {\r
-                    int count = stream.read(buffer, pos, buffer.length-pos);\r
-                    if(count <= 0)\r
-                        break;\r
-                    pos += count;\r
-                    if(pos == buffer.length)\r
-                        buffer = Arrays.copyOf(buffer, buffer.length*2);\r
-                }\r
-                return new String(buffer, 0, pos, UTF8);\r
-            } finally {\r
-                stream.close();\r
-            }\r
-        } catch(IOException e) {\r
-            e.printStackTrace();\r
-            return null;\r
-        }\r
-    }\r
-}\r
+package org.simantics.scl.osgi.internal;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.nio.charset.Charset;
+import java.util.Arrays;
+
+import org.osgi.framework.Bundle;
+
+public class BundleDocumentationSource {
+    public static final Charset UTF8 = Charset.forName("UTF-8");  
+    
+    public final String documentationName;
+    public final Bundle bundle;
+    public final URL url;
+    
+    public BundleDocumentationSource(String documentationName, Bundle bundle,
+            URL url) {
+        this.documentationName = documentationName;
+        this.bundle = bundle;
+        this.url = url;
+    }
+
+    public String getText() {
+        try {
+            InputStream stream = url.openStream();
+            try {
+                byte[] buffer = new byte[1024];
+                int pos = 0;
+                while(true) {
+                    int count = stream.read(buffer, pos, buffer.length-pos);
+                    if(count <= 0)
+                        break;
+                    pos += count;
+                    if(pos == buffer.length)
+                        buffer = Arrays.copyOf(buffer, buffer.length*2);
+                }
+                return new String(buffer, 0, pos, UTF8);
+            } finally {
+                stream.close();
+            }
+        } catch(IOException e) {
+            e.printStackTrace();
+            return null;
+        }
+    }
+}