org.freehep.application
Class StoppableInputStream
java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.freehep.application.StoppableInputStream
- All Implemented Interfaces:
- BoundedRangeModel, Stoppable
- public class StoppableInputStream
- extends FilterInputStream
- implements Stoppable, BoundedRangeModel
An input stream which also implements Stoppable. Useful when downloading
files in order to provide the user with feedback on progress.
- Version:
- $Id: StoppableInputStream.java,v 1.1 2002/09/11 01:51:41 tonyj Exp $
- Author:
- Tony Johnson (tonyj@slac.stanford.edu)
- Source Code:
- StoppableInputStream.java
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StoppableInputStream
public StoppableInputStream(URL url)
throws IOException
StoppableInputStream
public StoppableInputStream(InputStream in,
int length)
getModel
public BoundedRangeModel getModel()
- Specified by:
getModel
in interface Stoppable
stop
public void stop()
- Specified by:
stop
in interface Stoppable
read
public int read(byte[] b)
throws IOException
- Throws:
IOException
read
public int read()
throws IOException
- Throws:
IOException
read
public int read(byte[] b,
int off,
int len)
throws IOException
- Throws:
IOException
skip
public long skip(long n)
throws IOException
- Throws:
IOException
reset
public void reset()
throws IOException
- Throws:
IOException
mark
public void mark(int readlimit)
addChangeListener
public void addChangeListener(ChangeListener x)
- Specified by:
addChangeListener
in interface BoundedRangeModel
removeChangeListener
public void removeChangeListener(ChangeListener x)
- Specified by:
removeChangeListener
in interface BoundedRangeModel
getExtent
public int getExtent()
- Specified by:
getExtent
in interface BoundedRangeModel
getMaximum
public int getMaximum()
- Specified by:
getMaximum
in interface BoundedRangeModel
getMinimum
public int getMinimum()
- Specified by:
getMinimum
in interface BoundedRangeModel
getValue
public int getValue()
- Specified by:
getValue
in interface BoundedRangeModel
getValueIsAdjusting
public boolean getValueIsAdjusting()
- Specified by:
getValueIsAdjusting
in interface BoundedRangeModel
setExtent
public void setExtent(int newExtent)
- Specified by:
setExtent
in interface BoundedRangeModel
setMaximum
public void setMaximum(int newMaximum)
- Specified by:
setMaximum
in interface BoundedRangeModel
setMinimum
public void setMinimum(int newMinimum)
- Specified by:
setMinimum
in interface BoundedRangeModel
setRangeProperties
public void setRangeProperties(int value,
int extent,
int min,
int max,
boolean adjusting)
- Specified by:
setRangeProperties
in interface BoundedRangeModel
setValue
public void setValue(int newValue)
- Specified by:
setValue
in interface BoundedRangeModel
setValueIsAdjusting
public void setValueIsAdjusting(boolean b)
- Specified by:
setValueIsAdjusting
in interface BoundedRangeModel
Copyright © 2000-2004 FreeHEP, All Rights Reserved.