]>
git.argeo.org Git - lgpl/argeo-commons.git/blob - StreamUtils.java
10af68fa42f0862e72f477c18035b9af37eb55d2
3 import java
.io
.IOException
;
4 import java
.io
.InputStream
;
5 import java
.io
.OutputStream
;
7 /** Utilities to be used when APache COmmons IO is not available. */
8 public class StreamUtils
{
10 public static void copy(InputStream in
, OutputStream out
)
12 byte[] buf
= new byte[8192];
14 int length
= in
.read(buf
);
17 out
.write(buf
, 0, length
);
21 public static void closeQuietly(InputStream in
) {
25 } catch (Exception e
) {
30 public static void closeQuietly(OutputStream out
) {
34 } catch (Exception e
) {
39 private StreamUtils() {