Class SizeLimitedInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.atlassian.confluence.util.http.SizeLimitedInputStream
-
- All Implemented Interfaces:
Closeable,AutoCloseable
@Deprecated public class SizeLimitedInputStream extends InputStream
Deprecated.since 7.0.1 seeHttpRetrievalServicefor detailsThis is a wrapper around an InputStream that limits the amount of data that can be returned. This allows admins to set maximum download sizes for Confluence retrieved content, so that people can't, say, point the RSS macro at an ISO file and cause the system to collapse painfully.If you try to retrieve more than the maximum allowed size, the read() methods will fail with an IOException
-
-
Constructor Summary
Constructors Constructor Description SizeLimitedInputStream(InputStream wrappedInputStream, int maxBytesToRead)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intavailable()Deprecated.voidclose()Deprecated.voidmark(int readlimit)Deprecated.booleanmarkSupported()Deprecated.intread()Deprecated.voidreset()Deprecated.longskip(long n)Deprecated.-
Methods inherited from class java.io.InputStream
nullInputStream, read, read, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
SizeLimitedInputStream
public SizeLimitedInputStream(InputStream wrappedInputStream, int maxBytesToRead)
Deprecated.
-
-
Method Detail
-
read
public int read() throws IOExceptionDeprecated.- Specified by:
readin classInputStream- Throws:
IOException
-
skip
public long skip(long n) throws IOExceptionDeprecated.- Overrides:
skipin classInputStream- Throws:
IOException
-
close
public void close() throws IOExceptionDeprecated.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
available
public int available() throws IOExceptionDeprecated.- Overrides:
availablein classInputStream- Throws:
IOException
-
mark
public void mark(int readlimit)
Deprecated.- Overrides:
markin classInputStream
-
reset
public void reset() throws IOExceptionDeprecated.- Overrides:
resetin classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()
Deprecated.- Overrides:
markSupportedin classInputStream
-
-