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 {
while (!reader.isAtEnd()) {
char c = reader.peek();
- // TODO: << should result in the first < to be regarded as CDATA
if (c != '<')
readCData();
else {
reader.get();
readEndTag();
break;
+ case '<':
+ receiver.handleCData(new String(new char[] {c }));
+ break;
default:
readTag();
}
result.append(reader.get());
}
-
-
receiver.handleCData(HTMLRoutines.resolveHTMLEntites(result.toString()));
}
public Utility () {
super(new MirBasicUtilityFunctions());
}
+
public Object getDatetime() {
return new GeneratorDateTimeFunctions.DateTimeFunctions(
MirPropertiesConfiguration.instance().getString("Mir.DefaultTimezone"));
/*
* 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; }