public interface GetFileBits
Specifies a mechanism to obtain the raw bits of a file after close.
Note that this and the SetFileBits interfaces are different
than the RawStorage interfaces in that those are implemented by
clients to provide access to the desired media; these are provided
by the toolkit to provide read OR write (but not both simultaneously)
access to the raw bits.
| Modifier and Type | Method and Description |
|---|---|
long |
getSize()
Returns the size of the file in bytes.
|
byte[] |
readAt(int bufSize,
long position)
Attempts to read bufsize bytes from this stream at the given byte
offset and returns them as a byte array.
|
@DataBuffer byte[] readAt(@UInt32 int bufSize, @UInt64 long position) throws OffsetSizeException
Attempts to read bufsize bytes from this stream at the given byte
offset and returns them as a byte array. Any attempt to read beyond
the size of this file, as reported by getSize(), will be
considered an error.
A value of zero for position indicates the beginning of the stream.
bufSize - Size of the buffer to read into.position - The position into the file from which to read.OffsetSizeException - The sum position + bufSize
is larger than the size of the file.@UInt64 long getSize()
Returns the size of the file in bytes.
(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.