120 virtual void write(
Int64 size,
const void* buf);
180 static void close(
int fd);
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
virtual void mark(uInt howMany=1)
write the specified number of filemarks.
virtual void write(Int64 size, const void *buf)
Write the specified number of bytes.
virtual ~TapeIO()
The destructor will only close the file if the appropriate constructor, or attach function...
SeekOption
Define the possible seek options.
virtual Int64 read(Int64 size, void *buf, Bool throwException=True)
Read size bytes from the tape.
virtual Bool isReadable() const
Is the tape device readable?
void setFixedBlockSize(uInt sizeInBytes)
Configure the tape device to use fixed length blocks of the specified size.
TapeIO & operator=(const TapeIO &that)
virtual void rewind()
Rewind the tape device to the beginning.
static void close(int fd)
virtual String fileName() const
Get the name of the attached device or return a zero length string if it cannot be determined...
virtual Int64 length()
Get the length of the tape device.
TapeIO()
Default constructor.
uInt getBlockSize() const
Abstract base class for IO on a byte stream.
virtual void skip(uInt howMany=1)
skip the specified number of files (ie tape marks) on the tape.
uInt fixedBlockSize() const
returns the block size in bytes.
void fillSeekable()
Determine if the file is seekable.
bool Bool
Define the standard types used by Casacore.
Bool fixedBlocks() const
returns True if the tape device is configured to use a fixed block size
void attach(int fd)
Attach to the given file descriptor.
void detach()
Detach the FILE.
void setBlockSize(uInt sizeInBytes)
virtual Bool isSeekable() const
Is the tape device seekable?
String: the storage and methods of handling collections of characters.
Class for IO on a tape device.
static int open(const Path &device, Bool writable=False)
Some static convenience functions for file descriptor opening & closing.
void setVariableBlockSize()
Configure the tape device to use variable length blocks.
virtual Int64 doSeek(Int64 offset, ByteIO::SeekOption)
Reset the position pointer to the given value.
void fillRWFlags()
Determine if the file is readable and/or writable.
virtual Bool isWritable() const
Is the tape device writable?