OSDN Git Service

update documents
authortama3 <tama3@acee48c3-7b26-0410-bdac-b3d0e5314bbc>
Tue, 16 Sep 2008 07:10:55 +0000 (07:10 +0000)
committertama3 <tama3@acee48c3-7b26-0410-bdac-b3d0e5314bbc>
Tue, 16 Sep 2008 07:10:55 +0000 (07:10 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/stigmata/digger/trunk@306 acee48c3-7b26-0410-bdac-b3d0e5314bbc

src/site/apt/index.apt

index aa29ac7..fa8296f 100644 (file)
@@ -9,5 +9,31 @@
 Overview\r
 \r
  This library searches location of classes from classpath, file\r
-system, jar files, zip files, and war files.\r
+system, jar files, zip files, and war files.  <Digger> can be used for\r
+the application which engineer class files.\r
 \r
+How to Use\r
+\r
+----\r
+    ClasspathContext context = new ClasspathContext();\r
+    context.addClasspath(<url of class path>);\r
+        :\r
+\r
+    if(context.hasEntry("fully.class.name")){\r
+        ClassFileEntry entry = context.findEntry("fully.class.name");\r
+        if(entry != null){\r
+            try{\r
+                InputStream in = entry.openStream();\r
+\r
+                // some operation...\r
+            } catch(IOException exception){\r
+                // handle exception...\r
+            }\r
+        }\r
+        else{\r
+            throw new InternalError("never thrown, because hasEntry method returns true.");\r
+        }\r
+    }\r
+----\r
+\r
\ No newline at end of file