31 #include <casacore/casa/aips.h> 32 #include <casacore/casa/IO/ByteIO.h> 33 #include <casacore/casa/BasicSL/String.h> 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)
uInt fixedBlockSize() const
returns the block size in bytes.
virtual Bool isSeekable() const
Is the tape device seekable?
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.
void setFixedBlockSize(uInt sizeInBytes)
Configure the tape device to use fixed length blocks of the specified size.
virtual String fileName() const
Get the name of the attached device or return a zero length string if it cannot be determined...
TapeIO & operator=(const TapeIO &that)
virtual void rewind()
Rewind the tape device to the beginning.
static void close(int fd)
uInt getBlockSize() const
virtual Int64 length()
Get the length of the tape device.
TapeIO()
Default constructor.
Bool fixedBlocks() const
returns True if the tape device is configured to use a fixed block size
virtual Bool isWritable() const
Is the tape device writable?
Abstract base class for IO on a byte stream.
virtual Bool isReadable() const
Is the tape device readable?
virtual void skip(uInt howMany=1)
skip the specified number of files (ie tape marks) on the tape.
void fillSeekable()
Determine if the file is seekable.
bool Bool
Define the standard types used by Casacore.
void attach(int fd)
Attach to the given file descriptor.
void detach()
Detach the FILE.
void setBlockSize(uInt sizeInBytes)
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.
this file contains all the compiler specific defines
void fillRWFlags()
Determine if the file is readable and/or writable.