DefaultFileRegion
Default FileRegion implementation which transfer data from a FileChannel or File. Be aware that the FileChannel will be automatically closed once FileRegion.refCnt returns 0.
Value parameters
- count
-
the number of bytes to transfer
- position
-
the position from which the transfer should start
Attributes
- Graph
-
- Supertypes
-
trait FileRegionclass AbstractReferenceCountedtrait ReferenceCountedclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Constructors
Create a new instance
Create a new instance
Value parameters
- count
-
the number of bytes to transfer
- fileChannel
-
the FileChannel which should be transferred
- position
-
the position from which the transfer should start
Attributes
Create a new instance using the given File. The File will be opened lazily or explicitly via open.
Create a new instance using the given File. The File will be opened lazily or explicitly via open.
Value parameters
- count
-
the number of bytes to transfer
- file
-
the File which should be transferred
- position
-
the position from which the transfer should start
Attributes
Concrete methods
Attributes
- Definition Classes
Returns true if the FileRegion has a open file-descriptor
Explicitly open the underlying file-descriptor if not done yet.
Explicitly open the underlying file-descriptor if not done yet.
Attributes
Transfers the content of this file region to the specified channel.
Transfers the content of this file region to the specified channel.
Value parameters
- position
-
the relative offset of the file where the transfer begins from. For example, 0 will make the transfer start from positionth byte and count - 1 will make the last byte of the region transferred.
- target
-
the destination of the transfer
Attributes
- Definition Classes
Returns the bytes which was transferred already.
Inherited methods
Returns the reference count of this object. If 0, it means this object has been deallocated.
Returns the reference count of this object. If 0, it means this object has been deallocated.
Attributes
- Definition Classes
-
AbstractReferenceCounted -> ReferenceCounted
- Inherited from:
- AbstractReferenceCounted
Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
Value parameters
- decrement
-
decrement reference count
Attributes
- Returns
-
true if and only if the reference count became 0 and this object has been deallocated
- Definition Classes
-
AbstractReferenceCounted -> ReferenceCounted
- Inherited from:
- AbstractReferenceCounted
Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
Attributes
- Returns
-
true if and only if the reference count became 0 and this object has been deallocated
- Definition Classes
-
AbstractReferenceCounted -> ReferenceCounted
- Inherited from:
- AbstractReferenceCounted
Increases the reference count by the specified increment.
Increases the reference count by the specified increment.
Attributes
- Definition Classes
-
AbstractReferenceCounted -> ReferenceCounted
- Inherited from:
- AbstractReferenceCounted
Increases the reference count by 1.
Increases the reference count by 1.
Attributes
- Definition Classes
-
AbstractReferenceCounted -> ReferenceCounted
- Inherited from:
- AbstractReferenceCounted