Changeset 3920
- Timestamp:
- Nov 7, 2007, 12:43:13 PM (15 years ago)
- Location:
- trunk/src/webservices
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/webservices/client/java/net/sf/basedb/ws/client/AbstractRPCClient.java
r3876 r3920 101 101 } 102 102 } 103 out.close(); 103 104 return receivedFile; 104 105 } -
trunk/src/webservices/server/net/sf/basedb/ws/server/BaseFileDataSource.java
r3919 r3920 26 26 import net.sf.basedb.core.File; 27 27 28 import java.io.BufferedOutputStream; 28 29 import java.io.IOException; 29 30 import java.io.InputStream; … … 40 41 { 41 42 private File file = null; 43 private OutputStream os = null; 42 44 43 45 /** … … 52 54 public String getContentType() 53 55 { 54 return file.getMimeType() ;56 return file.getMimeType() == null ? "application/octet-stream" : file.getMimeType(); 55 57 } 56 58 57 public InputStream getInputStream() throws IOException 59 public InputStream getInputStream() 60 throws IOException 58 61 { 59 62 return file.getDownloadStream(0); … … 65 68 } 66 69 67 public OutputStream getOutputStream() throws IOException 68 { 69 return file.getUploadStream(false); 70 public OutputStream getOutputStream() 71 throws IOException 72 { 73 if (os != null) os.close(); 74 os = new BufferedOutputStream(file.getUploadStream(false)); 75 return os; 70 76 } 71 77
Note: See TracChangeset
for help on using the changeset viewer.