Author: alessio.soldano(a)jboss.com
Date: 2012-12-11 13:24:53 -0500 (Tue, 11 Dec 2012)
New Revision: 17068
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/CachedOutputStream.java
Log:
Minor fix
Modified:
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/CachedOutputStream.java
===================================================================
---
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/CachedOutputStream.java 2012-12-11
14:30:36 UTC (rev 17067)
+++
stack/native/trunk/modules/core/src/main/java/org/jboss/ws/core/utils/CachedOutputStream.java 2012-12-11
18:24:53 UTC (rev 17068)
@@ -196,13 +196,19 @@
{
FileInputStream fin = new FileInputStream(tempFile);
byte bytes[] = new byte[1024];
- int x = fin.read(bytes);
- while (x != -1)
+ try
{
- out.append(new String(bytes, 0, x, charsetName));
- x = fin.read(bytes);
+ int x = fin.read(bytes);
+ while (x != -1)
+ {
+ out.append(new String(bytes, 0, x, charsetName));
+ x = fin.read(bytes);
+ }
}
- fin.close();
+ finally
+ {
+ fin.close();
+ }
}
}
Show replies by date