|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.core.spool.SmartSpool
public class SmartSpool
Spool that delegates to the overThresholdSpool immediately if InputStream::available() is greater than the threshold of the secondary Thresholding spool. This avoids needless spooling of data into memory from InputStreams with large amounts of initial data available
| Constructor Summary | |
|---|---|
SmartSpool()
|
|
| Method Summary | |
|---|---|
int |
getThresholdBytes()
|
void |
setOverThresholdSpool(Spool overThresholdSpool)
Set the spooling strategy to use when InputStream::available is greater than the threshold of the configured ThresholdingSpool |
void |
setThresholdBytes(int bytes)
|
void |
setThresholdingSpool(ThresholdingSpool thresholdingSpool)
Set the spooling strategy that will be used when InputStream::available() is less than or equal to the value of the strategy's threshold. |
InputStream |
spool(InputStream is)
Return a new InputStream to the data provided. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SmartSpool()
| Method Detail |
|---|
public void setThresholdBytes(int bytes)
setThresholdBytes in interface ThresholdingSpoolpublic int getThresholdBytes()
getThresholdBytes in interface ThresholdingSpool
public InputStream spool(InputStream is)
throws IOException
Spool
spool in interface Spoolis - - Source stream to be spooled
IOExceptionpublic void setOverThresholdSpool(Spool overThresholdSpool)
overThresholdSpool - public void setThresholdingSpool(ThresholdingSpool thresholdingSpool)
thresholdingSpool -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||