gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] alph/org/nongnu/alph Alph.java impl/StormAlph.java


From: Tuomas J. Lukka
Subject: [Gzz-commits] alph/org/nongnu/alph Alph.java impl/StormAlph.java
Date: Mon, 21 Apr 2003 15:40:08 -0400

CVSROOT:        /cvsroot/alph
Module name:    alph
Changes by:     Tuomas J. Lukka <address@hidden>        03/04/21 15:40:08

Modified files:
        org/nongnu/alph: Alph.java 
        org/nongnu/alph/impl: StormAlph.java 

Log message:
        Test almost runs

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/alph/alph/org/nongnu/alph/Alph.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/alph/alph/org/nongnu/alph/impl/StormAlph.java.diff?tr1=1.2&tr2=1.3&r1=text&r2=text

Patches:
Index: alph/org/nongnu/alph/Alph.java
diff -u alph/org/nongnu/alph/Alph.java:1.2 alph/org/nongnu/alph/Alph.java:1.3
--- alph/org/nongnu/alph/Alph.java:1.2  Mon Apr 21 15:33:30 2003
+++ alph/org/nongnu/alph/Alph.java      Mon Apr 21 15:40:08 2003
@@ -21,7 +21,8 @@
      * the file being there also the <b>next</b> time the program
      * is started by avoiding certain kinds of optimizations.
      */
-    public final ScrollBlock addFile(File f, String contentType) {
+    public final ScrollBlock addFile(File f, String contentType) 
+           throws java.io.IOException{
        String id = addFile_id(f, contentType);
        return getScrollBlock(id);
     }
@@ -29,7 +30,8 @@
     /** Implement adding a file to this Alph.
      * @return The id; passing the id to getScrollBlock() shall return the 
file.
      */
-    protected String addFile_id(File f, String contentType) {
+    protected String addFile_id(File f, String contentType) 
+           throws java.io.IOException {
        throw new UnsupportedOperationException();
     }
 
Index: alph/org/nongnu/alph/impl/StormAlph.java
diff -u alph/org/nongnu/alph/impl/StormAlph.java:1.2 
alph/org/nongnu/alph/impl/StormAlph.java:1.3
--- alph/org/nongnu/alph/impl/StormAlph.java:1.2        Mon Apr 21 15:33:30 2003
+++ alph/org/nongnu/alph/impl/StormAlph.java    Mon Apr 21 15:40:08 2003
@@ -44,4 +44,15 @@
        }
     }
 
+    protected String addFile_id(java.io.File f, String contentType) 
+           throws java.io.IOException {
+       BlockOutputStream os = stormPool.getBlockOutputStream(contentType);
+       org.nongnu.storm.util.CopyUtil.copy(
+               new java.io.FileInputStream(f),
+               os);
+       os.close();
+       Block b = os.getBlock();
+       return b.getId().toString();
+    }
+
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]