INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Long and binary data support"
project: "Visual Eiffel"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: dale
class BLOB_FILE
inherit

BLOB_EXTENSIBLE
redefine
close,
more,
offset_pointer,
portion_size
end
creation

make,
make_external,
make_external_t,
make_file,
make_file_t,
make_t
feature -- Attributes:

file_name: STRING
feature -- Commands:

make_file (path: STRING; nbytes: INTEGER)
-- creation procedure; creates a buffer of the specified size and
-- set default `file_name'
require
valid_size: valid_size (nbytes)

make_file_t (path: STRING; nbytes: INTEGER; t: INTEGER)
-- creation procedure; creates a buffer of the specified size and
-- set default `file_name'
require
valid_size: valid_size (nbytes)
valid_type: tconst.is_blob_type (t)

load (path: STRING)
-- load the contents of the BLOB from
-- the specified file
require
valid_path: valid_path (path)
end_of_data: not end_of_data

load_block (path: STRING; blob_offs, file_offs, nbytes: INTEGER)
-- load `nbytes' from file `path' starting from `file_offs'
-- to the current BLOB starting from the `blob_offs'
-- the current BLOB will be resized if it's be needed
require
valid_path: valid_path (path)
valid_blob_offset: 0 <= blob_offs
valid_file_offset: 0 <= file_offs
valid_size: valid_size (nbytes)

save (path: STRING)
-- save the contents of the BLOB into the specified file
require
valid_path: valid_path (path)
end_of_data: not end_of_data

save_block (path: STRING; blob_offs, file_offs, nbytes: INTEGER)
-- save `nbytes' from current BLOB starting from `blob_offs'
-- to the file `path' starting from the `file_offs'
-- file will be resized if it's be needed
require
valid_path: valid_path (path)
valid_blob_offset: 0 <= blob_offs and then blob_offs + nbytes <= size
valid_file_offset: 0 <= file_offs
valid_size: valid_size (nbytes)

close
-- deallocate memory

reinit (nbytes: INTEGER)
-- reinitialization memory block and set `end_of_data' to FALSE

offset_pointer: POINTER
-- ...

more (b: BOOLEAN)
-- ...

portion_size: INTEGER
-- ...
feature -- Validations:

valid_path (path: STRING): BOOLEAN
-- is this path valid?
end -- class BLOB_FILE

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES