problem with ghost fragments appearing after generated files has been fixed
authorzapata <zapata>
Sun, 10 Apr 2005 10:51:59 +0000 (10:51 +0000)
committerzapata <zapata>
Sun, 10 Apr 2005 10:51:59 +0000 (10:51 +0000)
source/mir/util/FileFunctions.java
source/mir/util/xml/html/HTMLScanner.java
source/mircoders/localizer/basic/MirBasicProducerAssistantLocalizer.java
source/mircoders/servlet/ServletModuleImages.java

index 476451c..08fd66b 100755 (executable)
@@ -144,8 +144,10 @@ public class FileFunctions {
       FileInputStream inputStream = new FileInputStream(aSource);
       FileOutputStream outputStream = new FileOutputStream(aDestination);
       try {
-        while (inputStream.read(buffer)>0) {
-          outputStream.write(buffer);
+        int count=inputStream.read(buffer);
+        while (count>0) {
+          outputStream.write(buffer, 0, count);
+          count=inputStream.read(buffer);
         }
       }
       finally {
index 816c8fa..319d053 100755 (executable)
@@ -30,7 +30,6 @@ public class HTMLScanner {
     while (!reader.isAtEnd()) {
       char c = reader.peek();
 
-      // TODO: << should result in the first < to be regarded as CDATA
       if (c != '<')
         readCData();
       else {
@@ -46,6 +45,9 @@ public class HTMLScanner {
             reader.get();
             readEndTag();
             break;
+          case '<':
+            receiver.handleCData(new String(new char[] {c }));
+            break;
           default:
             readTag();
         }
@@ -238,8 +240,6 @@ public class HTMLScanner {
       result.append(reader.get());
     }
 
-
-
     receiver.handleCData(HTMLRoutines.resolveHTMLEntites(result.toString()));
   }
 
index e4a1629..286d571 100755 (executable)
@@ -324,6 +324,7 @@ public class MirBasicProducerAssistantLocalizer implements MirProducerAssistantL
     public Utility () {
       super(new MirBasicUtilityFunctions());
     }
+
     public Object getDatetime() {
       return new GeneratorDateTimeFunctions.DateTimeFunctions(
         MirPropertiesConfiguration.instance().getString("Mir.DefaultTimezone"));
index 0075463..1bfe0d8 100755 (executable)
@@ -36,13 +36,12 @@ import mircoders.module.ModuleImages;
 /*
  *  ServletModuleImages -
  *
- * @version $Id: ServletModuleImages.java,v 1.26.2.4 2004/11/21 22:07:14 zapata Exp $
+ * @version $Id: ServletModuleImages.java,v 1.26.2.5 2005/04/10 10:52:00 zapata Exp $
  * @author RK, the mir-coders group
  */
 
 public class ServletModuleImages extends ServletModuleUploadedMedia
 {
-  // Singelton / Kontruktor
   private static ServletModuleImages instance = new ServletModuleImages();
   public static ServletModule getInstance() { return instance; }