public class

SizeLimitedInputStream

extends InputStream
java.lang.Object
   ↳ java.io.InputStream
     ↳ com.atlassian.confluence.util.http.SizeLimitedInputStream

Class Overview

This 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

Summary

Public Constructors
SizeLimitedInputStream(InputStream wrappedInputStream, int maxBytesToRead)
Public Methods
int available()
void close()
synchronized void mark(int readlimit)
boolean markSupported()
int read()
synchronized void reset()
long skip(long n)
[Expand]
Inherited Methods
From class java.io.InputStream
From class java.lang.Object
From interface java.io.Closeable

Public Constructors

public SizeLimitedInputStream (InputStream wrappedInputStream, int maxBytesToRead)

Public Methods

public int available ()

Throws
IOException

public void close ()

Throws
IOException

public synchronized void mark (int readlimit)

public boolean markSupported ()

public int read ()

Throws
IOException

public synchronized void reset ()

Throws
IOException

public long skip (long n)

Throws
IOException