public class OwStreamUtil extends Object
Utility class for Streams.
Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.
For licensing information read the license.txt file or
go to: http://wiki.alfresco.com
Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_SIZE
buffer for read and write
|
static int |
MIN_READ
min size if read is blocked
|
Constructor and Description |
---|
OwStreamUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
upload(InputStream in_p,
OutputStream out_p,
boolean fClose_p)
upload the given OutputStream to the given InputStream
The InputStream (in_p) and OutputStream (out_p) are closed
|
static void |
upload(InputStream in_p,
OutputStream out_p,
boolean fClose_p,
int bufSize_p)
Helper method which redirect the input stream to the output stream,
using a buffer with given size.
|
public static final int BUFFER_SIZE
public static final int MIN_READ
public static void upload(InputStream in_p, OutputStream out_p, boolean fClose_p) throws Exception
in_p
- InputStreamout_p
- OutputStreamfClose_p
- Close the stream after finishingException
public static void upload(InputStream in_p, OutputStream out_p, boolean fClose_p, int bufSize_p) throws IOException
in_p
- InputStream to redirectout_p
- OutputStream for redirectionfClose_p
- flag for closing streams at the endbufSize_p
- int buffer size to be used for redirectionIOException
- if any problems during redirectionCopyright © 2014 Alfresco Business Solutions. All Rights Reserved.