Media Authoring
with Java API

tv.amwa.maj.iface
Interface SetFileBits


public interface SetFileBits

This interface is implemented by the toolkit, and is provided to clients of AAF file to allow them to supply the raw bits of a file before open.

Note that this and the get file bits interfaces are different to the raw storage 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.

Author:
Richard Cartwright

Method Summary
 void setSize(long size)
          Attempts to reserve the given number of bytes of storage.
 void writeAt(byte[] buf, long position)
          Writes the given data buffer into the file and the given position.
 

Method Detail

writeAt

void writeAt(@DataBuffer
             byte[] buf,
             @UInt64
             long position)
             throws NullPointerException,
                    DataSizeException

Writes the given data buffer into the file and the given position. The position is measured in bytes, with a value of 0 indicating the beginning of the stream.

Parameters:
buf - Buffer from which data is written.
position - Position in the file at which to write.
Throws:
NullPointerException - Argument is null.
DataSizeException - The requested space, determined by the position and size of the buffer, is not available.

setSize

void setSize(@UInt64
             long size)
             throws DataSizeException

Attempts to reserve the given number of bytes of storage.

Parameters:
size - Number of bytes requested.
Throws:
DataSizeException - The requested space is not available.

Media Authoring
with Java API

(c) 2007-2008 Richard Cartwright, all rights reserved. Subject to the terms of the AAF SDK Public Source License.