DatagramGenerator

class DatagramGenerator

This class defines the abstract interace to any source of datagrams, whether it be from a file or from the net.

Inheritance diagram

digraph inheritance58010f3a22 { bgcolor=transparent; rankdir=BT; size="8.0, 12.0"; "DTOOL_SUPER_BASE" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style=""]; "DatagramGenerator" [URL="acron.core.DatagramGenerator.html#acron.core.DatagramGenerator",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="",target="_top",tooltip="/**"]; "DTOOL_SUPER_BASE" -> "DatagramGenerator" [arrowsize=0.75,style=""]; }
DatagramGenerator.get_datagram()
DatagramGenerator.get_file()

Returns the FileReference that provides the source for these datagrams, if any, or NULL if the datagrams do not originate from a file on disk.

DatagramGenerator.get_file_pos()

Returns the current file position within the data stream, if any, or 0 if the file position is not meaningful or cannot be determined.

For DatagramGenerators that return a meaningful file position, this will be pointing to the first byte following the datagram returned after a call to get_datagram().

DatagramGenerator.get_filename()

Returns the filename that provides the source for these datagrams, if any, or empty string if the datagrams do not originate from a file on disk.

DatagramGenerator.get_timestamp()

Returns the on-disk timestamp of the file that was read, at the time it was opened, if that is available, or 0 if it is not.

DatagramGenerator.get_vfile()

Returns the VirtualFile that provides the source for these datagrams, if any, or NULL if the datagrams do not originate from a VirtualFile.

DatagramGenerator.is_eof()
DatagramGenerator.is_error()
DatagramGenerator.save_datagram()

Skips over the next datagram without extracting it, but saves the relevant file information in the SubfileInfo object so that its data may be read later. For non-file-based datagram generators, this may mean creating a temporary file and copying the contents of the datagram to disk.

Returns true on success, false on failure or if this method is unimplemented.