servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bsny...@apache.org
Subject svn commit: r610925 - /servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
Date Thu, 10 Jan 2008 20:46:59 GMT
Author: bsnyder
Date: Thu Jan 10 12:46:58 2008
New Revision: 610925

URL: http://svn.apache.org/viewvc?rev=610925&view=rev
Log:
SM-1058 - Allow the File Binding Component to work in append mode.

Modified:
    servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java

Modified: servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java?rev=610925&r1=610924&r2=610925&view=diff
==============================================================================
--- servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
(original)
+++ servicemix/smx3/trunk/deployables/bindingcomponents/servicemix-file/src/main/java/org/apache/servicemix/file/FileSenderEndpoint.java
Thu Jan 10 12:46:58 2008
@@ -40,13 +40,16 @@
     private String tempFilePrefix = "servicemix-";
     private String tempFileSuffix = ".xml";
     private boolean autoCreateDirectory = true;
+    private boolean append = true;
 
 
     public FileSenderEndpoint() {
+        append = false;
     }
 
     public FileSenderEndpoint(FileComponent component, ServiceEndpoint endpoint) {
         super(component, endpoint);
+        append = false;
     }
 
     public void validate() throws DeploymentException {
@@ -79,7 +82,7 @@
             if (logger.isDebugEnabled()) {
                 logger.debug("Writing to file: " + newFile.getCanonicalPath());
             }
-            out = new BufferedOutputStream(new FileOutputStream(newFile));
+            out = new BufferedOutputStream(new FileOutputStream(newFile, append));
             marshaler.writeMessage(exchange, in, out, name);
             success = true;
         } finally {
@@ -145,6 +148,14 @@
 
     public void setAutoCreateDirectory(boolean autoCreateDirectory) {
         this.autoCreateDirectory = autoCreateDirectory;
+    }
+
+    public boolean isAppend() {
+        return append;
+    }
+
+    public void setAppend(boolean append) {
+        this.append = append;
     }
 
 }



Mime
View raw message