package apollo.jnlp;
import java.io.*;
import apollo.*;
public class JnlpFileSaveService implements FileSaveService
{
javax.jnlp.FileSaveService _delegate;
public JnlpFileSaveService( javax.jnlp.FileSaveService delegate )
{
_delegate = delegate;
}
public FileContents saveAsFileDialog( String pathHint, String exts[], FileContents contentsWrapper ) throws IOException
{
javax.jnlp.FileContents contentsIn = null;
if( contentsWrapper != null )
contentsIn = ( ( JnlpFileContents ) contentsWrapper ).getDelegate();
javax.jnlp.FileContents contentsOut =
_delegate.saveAsFileDialog( pathHint, exts, contentsIn );
if( contentsIn == contentsOut )
return contentsWrapper;
if( contentsOut == null )
return null;
else
return new JnlpFileContents( contentsOut );
}
public FileContents saveFileDialog( String pathHint, String exts[], InputStream stream, String name ) throws IOException
{
javax.jnlp.FileContents contents =
_delegate.saveFileDialog( pathHint, exts, stream, name );
if( contents == null )
return null;
else
return new JnlpFileContents( contents );
}
}