Package sun.net
Class ProgressEvent
- java.lang.Object
-
- java.util.EventObject
-
- sun.net.ProgressEvent
-
- All Implemented Interfaces:
Serializable
public class ProgressEvent extends EventObject
ProgressEvent represents an progress event in monitering network input stream.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ProgressEvent(ProgressSource source, URL url, String method, String contentType, ProgressSource.State state, long progress, long expected)Construct a ProgressEvent object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()Return content type of the URL.longgetExpected()Return expected maximum progress value; -1 if expected is unknown.StringgetMethod()Return method associated with URL.longgetProgress()Return current progress value.ProgressSource.StategetState()Return state.URLgetURL()Return URL related to the progress.StringtoString()Returns a String representation of this EventObject.-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Constructor Detail
-
ProgressEvent
public ProgressEvent(ProgressSource source, URL url, String method, String contentType, ProgressSource.State state, long progress, long expected)
Construct a ProgressEvent object.
-
-
Method Detail
-
getURL
public URL getURL()
Return URL related to the progress.
-
getMethod
public String getMethod()
Return method associated with URL.
-
getContentType
public String getContentType()
Return content type of the URL.
-
getProgress
public long getProgress()
Return current progress value.
-
getExpected
public long getExpected()
Return expected maximum progress value; -1 if expected is unknown.
-
getState
public ProgressSource.State getState()
Return state.
-
toString
public String toString()
Description copied from class:EventObjectReturns a String representation of this EventObject.- Overrides:
toStringin classEventObject- Returns:
- A a String representation of this EventObject.
-
-