Mercurial > projects > dwt-win
diff dwt/internal/Compatibility.d @ 213:36f5cb12e1a2
Update to SWT 3.4M7
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sat, 17 May 2008 17:34:28 +0200 |
parents | ab60f3309436 |
children | fd9c62a2998e |
line wrap: on
line diff
--- a/dwt/internal/Compatibility.d Mon May 05 00:12:38 2008 +0200 +++ b/dwt/internal/Compatibility.d Sat May 17 17:34:28 2008 +0200 @@ -14,9 +14,11 @@ /+ import java.io.*; +import java.io.File; import java.text.MessageFormat; import java.util.MissingResourceException; import java.util.ResourceBundle; +import java.util.zip.DeflaterOutputStream; import java.util.zip.InflaterInputStream; +/ @@ -29,6 +31,7 @@ import Unicode = tango.text.Unicode; import tango.sys.Process; import dwt.dwthelper.utils; +import tango.io.Path; /** * This class is a placeholder for utility methods commonly @@ -109,6 +112,17 @@ } /** + * Answers whether the indicated file exists or not. + * + * @param parent the file's parent directory + * @param child the file's name + * @return true if the file exists + */ +public static bool fileExists(String parent, String child) { + return FS.exists( FS.join(parent, child)); +} + +/** * Answers the most positive (i.e. closest to positive infinity) * integer value which is less than the number obtained by dividing * the first argument p by the second argument q. @@ -158,6 +172,22 @@ } /** + * Create an DeflaterOutputStream if such things are supported. + * + * @param stream the output stream + * @return a deflater stream or <code>null</code> + * @exception IOException + * + * @since 3.4 + */ +public static OutputStream newDeflaterOutputStream(OutputStream stream) { + //DWT_TODO + implMissing(__FILE__,__LINE__); + return null; + //return new DeflaterOutputStream(stream); +} + +/** * Open a file if such things are supported. * * @param filename the name of the file to open