Package com.biglybt.core.devices.impl
Class TranscodeJobOutputLeecher.Channel.request
java.lang.Object
com.biglybt.core.devices.impl.TranscodeJobOutputLeecher.Channel.request
- All Implemented Interfaces:
DiskManagerRequest
- Enclosing class:
- TranscodeJobOutputLeecher.Channel
protected class TranscodeJobOutputLeecher.Channel.request
extends Object
implements DiskManagerRequest
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate long
private CopyOnWriteList<DiskManagerListener>
private int
private long
private long
private boolean
Fields inherited from interface com.biglybt.pif.disk.DiskManagerRequest
REQUEST_READ
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(DiskManagerListener listener) void
cancel()
long
Get the number of bytes available for immediate reading from the request given its current position.long
Get the number of bytes remaining to be read for the requestvoid
removeListener
(DiskManagerListener listener) void
run()
protected void
void
setLength
(long _length) void
setMaximumReadChunkSize
(int size) void
setOffset
(long _offset) void
setType
(int type) void
setUserAgent
(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
-
offset
private long offset -
length
private long length -
position
private long position -
max_read_chunk
private int max_read_chunk -
request_cancelled
private volatile boolean request_cancelled -
listeners
-
-
Constructor Details
-
request
protected request()
-
-
Method Details
-
setType
public void setType(int type) - Specified by:
setType
in interfaceDiskManagerRequest
-
setOffset
public void setOffset(long _offset) - Specified by:
setOffset
in interfaceDiskManagerRequest
-
setLength
public void setLength(long _length) - Specified by:
setLength
in interfaceDiskManagerRequest
-
setMaximumReadChunkSize
public void setMaximumReadChunkSize(int size) - Specified by:
setMaximumReadChunkSize
in interfaceDiskManagerRequest
-
getAvailableBytes
public long getAvailableBytes()Description copied from interface:DiskManagerRequest
Get 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:
getAvailableBytes
in interfaceDiskManagerRequest
- Returns:
-
getRemaining
public long getRemaining()Description copied from interface:DiskManagerRequest
Get the number of bytes remaining to be read for the request- Specified by:
getRemaining
in interfaceDiskManagerRequest
- Returns:
-
run
public void run()- Specified by:
run
in interfaceDiskManagerRequest
-
cancel
public void cancel()- Specified by:
cancel
in interfaceDiskManagerRequest
-
setUserAgent
Description copied from interface:DiskManagerRequest
Beware 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:
setUserAgent
in interfaceDiskManagerRequest
-
sendEvent
-
addListener
- Specified by:
addListener
in interfaceDiskManagerRequest
-
removeListener
- Specified by:
removeListener
in interfaceDiskManagerRequest
-