1 22 23 package apollo.jnlp; 24 25 import java.io.*; 26 import apollo.*; 27 28 public class JnlpFileSaveService implements FileSaveService 29 { 30 javax.jnlp.FileSaveService _delegate; 31 32 public JnlpFileSaveService( javax.jnlp.FileSaveService delegate ) 33 { 34 _delegate = delegate; 35 } 36 37 public FileContents saveAsFileDialog( String pathHint, String exts[], FileContents contentsWrapper ) throws IOException 38 { 39 javax.jnlp.FileContents contentsIn = null; 40 41 if( contentsWrapper != null ) 42 contentsIn = ( ( JnlpFileContents ) contentsWrapper ).getDelegate(); 43 44 javax.jnlp.FileContents contentsOut = 45 _delegate.saveAsFileDialog( pathHint, exts, contentsIn ); 46 47 if( contentsIn == contentsOut ) 48 return contentsWrapper; 49 50 if( contentsOut == null ) 51 return null; 52 else 53 return new JnlpFileContents( contentsOut ); 54 } 55 56 public FileContents saveFileDialog( String pathHint, String exts[], InputStream stream, String name ) throws IOException 57 { 58 javax.jnlp.FileContents contents = 59 _delegate.saveFileDialog( pathHint, exts, stream, name ); 60 61 if( contents == null ) 62 return null; 63 else 64 return new JnlpFileContents( contents ); 65 } 66 67 } 68 | Popular Tags |