public class OwFileUpStream extends FilterInputStream
PartInputStream
filters a ServletInputStream
, providing access
to a single MIME part contained with in which ends with the boundary specified.
It uses buffering to provide performance.
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
in
Constructor and Description |
---|
OwFileUpStream(javax.servlet.ServletInputStream in_p,
String boundary_p)
Creates a
PartInputStream which stops at the specified
boundary from a ServletInputStream . |
Modifier and Type | Method and Description |
---|---|
int |
available()
Returns the number of bytes that can be read from this input stream without
blocking.
|
void |
close()
Closes this input stream and releases any system resources associated with the stream.
|
int |
read()
Reads the next byte of data from the InputStream.
|
int |
read(byte[] b_p)
Reads some number of bytes from the input stream and stores them into the
buffer array.
|
int |
read(byte[] b_p,
int off_p,
int len_p)
Read upto len bytes of data from inputstream into an array of bytes.
|
mark, markSupported, reset, skip
public OwFileUpStream(javax.servlet.ServletInputStream in_p, String boundary_p) throws IOException
PartInputStream
which stops at the specified
boundary from a ServletInputStream
.in_p
- boundary_p
- IOException
public int read() throws IOException
read
in class FilterInputStream
-1
if the end of the stream is reached.IOException
- if an input or output exception has occurred.public int read(byte[] b_p) throws IOException
read
in class FilterInputStream
b_p
- the byte array buffer into which the data is read.IOException
public int read(byte[] b_p, int off_p, int len_p) throws IOException
read
in class FilterInputStream
b_p
- the byte array buffer into which the data is read.off_p
- int the start offset of the data.len_p
- int the total number of bytes read into the buffer, or
-1
if there is no more data because the
end of the stream has been reachedIOException
- if an I/O error occurs.public int available() throws IOException
available
in class FilterInputStream
IOException
- if an I/O error occurs.public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class FilterInputStream
IOException
- if an I/O error occurs.Copyright © 2014 Alfresco Business Solutions. All Rights Reserved.