Class DiskManagerFileInfoDelegate.channel.request
java.lang.Object
com.biglybt.core.download.DiskManagerFileInfoDelegate.channel.request
- All Implemented Interfaces:
DiskManagerRequest
- Enclosing class:
DiskManagerFileInfoDelegate.channel
protected class DiskManagerFileInfoDelegate.channel.request
extends Object
implements DiskManagerRequest
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate DiskManagerRequestprivate longprivate CopyOnWriteList<DiskManagerListener> private intprivate longprivate longprivate Stringprivate booleanFields inherited from interface DiskManagerRequest
REQUEST_READ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(DiskManagerListener listener) voidcancel()longGet the number of bytes available for immediate reading from the request given its current position.longGet the number of bytes remaining to be read for the requestvoidremoveListener(DiskManagerListener listener) voidrun()protected voidvoidsetLength(long _length) voidsetMaximumReadChunkSize(int size) voidsetOffset(long _offset) voidsetType(int type) voidsetUserAgent(String agent) Beware that invoking this method signifies that the media is being streamed and therefore may undergo transformations such as MOOV atom relocation in mp4s
-
Field Details
-
delegate_request
-
using_delegate
private volatile boolean using_delegate -
offset
private long offset -
length
private long length -
position
private volatile long position -
user_agent
-
max_read_chunk
private int max_read_chunk -
cancelled
private volatile boolean cancelled -
listeners
-
-
Constructor Details
-
request
request()
-
-
Method Details
-
setType
public void setType(int type) - Specified by:
setTypein interfaceDiskManagerRequest
-
setOffset
public void setOffset(long _offset) - Specified by:
setOffsetin interfaceDiskManagerRequest
-
setLength
public void setLength(long _length) - Specified by:
setLengthin interfaceDiskManagerRequest
-
setMaximumReadChunkSize
public void setMaximumReadChunkSize(int size) - Specified by:
setMaximumReadChunkSizein interfaceDiskManagerRequest
-
setUserAgent
Description copied from interface:DiskManagerRequestBeware that invoking this method signifies that the media is being streamed and therefore may undergo transformations such as MOOV atom relocation in mp4s- Specified by:
setUserAgentin interfaceDiskManagerRequest- Parameters:
agent-
-
getAvailableBytes
public long getAvailableBytes()Description copied from interface:DiskManagerRequestGet the number of bytes available for immediate reading from the request given its current position. If this information is not known (download not running) then -1 is returned- Specified by:
getAvailableBytesin interfaceDiskManagerRequest- Returns:
-
getRemaining
public long getRemaining()Description copied from interface:DiskManagerRequestGet the number of bytes remaining to be read for the request- Specified by:
getRemainingin interfaceDiskManagerRequest- Returns:
-
run
public void run()- Specified by:
runin interfaceDiskManagerRequest
-
cancel
public void cancel()- Specified by:
cancelin interfaceDiskManagerRequest
-
sendEvent
-
addListener
- Specified by:
addListenerin interfaceDiskManagerRequest
-
removeListener
- Specified by:
removeListenerin interfaceDiskManagerRequest
-