@Namespace(value="cv") @NoOffset public static class opencv_core.FileStorage extends Pointer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Modifier and Type | Field and Description |
|---|---|
static int |
APPEND
enum cv::FileStorage::Mode
|
static int |
BASE64
enum cv::FileStorage::Mode
|
static int |
FORMAT_AUTO
enum cv::FileStorage::Mode
|
static int |
FORMAT_JSON
enum cv::FileStorage::Mode
|
static int |
FORMAT_MASK
enum cv::FileStorage::Mode
|
static int |
FORMAT_XML
enum cv::FileStorage::Mode
|
static int |
FORMAT_YAML
enum cv::FileStorage::Mode
|
static int |
INSIDE_MAP
enum cv::FileStorage::
|
static int |
MEMORY
enum cv::FileStorage::Mode
|
static int |
NAME_EXPECTED
enum cv::FileStorage::
|
static int |
READ
enum cv::FileStorage::Mode
|
static int |
UNDEFINED
enum cv::FileStorage::
|
static int |
VALUE_EXPECTED
enum cv::FileStorage::
|
static int |
WRITE
enum cv::FileStorage::Mode
|
static int |
WRITE_BASE64
enum cv::FileStorage::Mode
|
| Constructor and Description |
|---|
FileStorage()
\brief The constructors.
|
FileStorage(BytePointer source,
int flags) |
FileStorage(BytePointer source,
int flags,
BytePointer encoding)
\overload
|
FileStorage(long size)
Native array allocator.
|
FileStorage(opencv_core.CvFileStorage fs) |
FileStorage(opencv_core.CvFileStorage fs,
boolean owning)
\overload
|
FileStorage(Pointer p)
Pointer cast constructor.
|
FileStorage(String source,
int flags) |
FileStorage(String source,
int flags,
String encoding) |
| Modifier and Type | Method and Description |
|---|---|
BytePointer |
elname()
the currently written element
|
opencv_core.FileStorage |
elname(BytePointer elname) |
opencv_core.CvFileStorage |
fs()
the underlying C FileStorage structure
|
opencv_core.FileStorage |
fs(opencv_core.CvFileStorage fs) |
opencv_core.FileNode |
get(BytePointer nodename)
\brief Returns the specified element of the top-level mapping.
|
opencv_core.FileNode |
get(String nodename) |
static BytePointer |
getDefaultObjectName(BytePointer filename)
\brief Returns the normalized object name for the specified name of a file.
|
static String |
getDefaultObjectName(String filename) |
opencv_core.FileNode |
getFirstTopLevelNode()
\brief Returns the first element of the top-level mapping.
|
opencv_core.FileNode |
getNode(BytePointer nodename)
\overload
|
opencv_core.FileNode |
getNode(String nodename) |
boolean |
isOpened()
\brief Checks whether the file is opened.
|
opencv_core.CvFileStorage |
multiply()
\brief Returns the obsolete C FileStorage structure.
|
boolean |
open(BytePointer filename,
int flags) |
boolean |
open(BytePointer filename,
int flags,
BytePointer encoding)
\brief Opens a file.
|
boolean |
open(String filename,
int flags) |
boolean |
open(String filename,
int flags,
String encoding) |
opencv_core.FileStorage |
position(long position) |
void |
release()
\brief Closes the file and releases all the memory buffers.
|
BytePointer |
releaseAndGetString()
\brief Closes the file and releases all the memory buffers.
|
opencv_core.FileNode |
root() |
opencv_core.FileNode |
root(int streamidx)
\brief Returns the top-level mapping
|
int |
state()
the writer state
|
opencv_core.FileStorage |
state(int state) |
BytePointer |
structs()
the stack of written structures
|
opencv_core.FileStorage |
structs(BytePointer structs) |
void |
write(BytePointer name,
BytePointer val)
\overload
|
void |
write(BytePointer name,
double val)
\brief Simplified writing API to use with bindings.
|
void |
write(BytePointer name,
opencv_core.Mat val)
\overload
|
void |
write(BytePointer name,
opencv_core.UMat val) |
void |
write(String name,
double val) |
void |
write(String name,
opencv_core.Mat val) |
void |
write(String name,
opencv_core.UMat val) |
void |
write(String name,
String val) |
void |
writeComment(BytePointer comment) |
void |
writeComment(BytePointer comment,
boolean append)
\brief Writes a comment.
|
void |
writeComment(String comment) |
void |
writeComment(String comment,
boolean append) |
void |
writeObj(BytePointer name,
Pointer obj)
\brief Writes the registered C structure (CvMat, CvMatND, CvSeq).
|
void |
writeObj(String name,
Pointer obj) |
void |
writeRaw(BytePointer fmt,
byte[] vec,
long len) |
void |
writeRaw(BytePointer fmt,
ByteBuffer vec,
long len) |
void |
writeRaw(BytePointer fmt,
BytePointer vec,
long len)
\brief Writes multiple numbers.
|
void |
writeRaw(String fmt,
byte[] vec,
long len) |
void |
writeRaw(String fmt,
ByteBuffer vec,
long len) |
void |
writeRaw(String fmt,
BytePointer vec,
long len) |
address, asBuffer, asByteBuffer, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, physicalBytes, position, put, realloc, setNull, sizeof, toString, totalBytes, withDeallocator, zeropublic static final int READ
public static final int WRITE
public static final int APPEND
public static final int MEMORY
public static final int FORMAT_MASK
public static final int FORMAT_AUTO
public static final int FORMAT_XML
public static final int FORMAT_YAML
public static final int FORMAT_JSON
public static final int BASE64
public static final int WRITE_BASE64
public static final int UNDEFINED
public static final int VALUE_EXPECTED
public static final int NAME_EXPECTED
public static final int INSIDE_MAP
public FileStorage(Pointer p)
Pointer.Pointer(Pointer).public FileStorage(long size)
Pointer.position(long).public FileStorage()
The full constructor opens the file. Alternatively you can use the default constructor and then call FileStorage::open.
public FileStorage(@opencv_core.Str BytePointer source, int flags, @opencv_core.Str BytePointer encoding)
source - Name of the file to open or the text string to read the data from. Extension of the
file (.xml, .yml/.yaml, or .json) determines its format (XML, YAML or JSON respectively). Also you can
append .gz to work with compressed files, for example myHugeMatrix.xml.gz. If both FileStorage::WRITE
and FileStorage::MEMORY flags are specified, source is used just to specify the output file format (e.g.
mydata.xml, .yml etc.).flags - Mode of operation. See FileStorage::Modeencoding - Encoding of the file. Note that UTF-16 XML encoding is not supported currently and
you should use 8-bit encoding instead of it.public FileStorage(@opencv_core.Str BytePointer source, int flags)
public FileStorage(@opencv_core.Str String source, int flags, @opencv_core.Str String encoding)
public FileStorage(@opencv_core.Str String source, int flags)
public FileStorage(opencv_core.CvFileStorage fs, @Cast(value="bool") boolean owning)
public FileStorage(opencv_core.CvFileStorage fs)
public opencv_core.FileStorage position(long position)
@Cast(value="bool") public boolean open(@opencv_core.Str BytePointer filename, int flags, @opencv_core.Str BytePointer encoding)
See description of parameters in FileStorage::FileStorage. The method calls FileStorage::release before opening the file.
filename - Name of the file to open or the text string to read the data from.
Extension of the file (.xml, .yml/.yaml or .json) determines its format (XML, YAML or JSON
respectively). Also you can append .gz to work with compressed files, for example myHugeMatrix.xml.gz. If both
FileStorage::WRITE and FileStorage::MEMORY flags are specified, source is used just to specify
the output file format (e.g. mydata.xml, .yml etc.). A file name can also contain parameters.
You can use this format, "*?base64" (e.g. "file.json?base64" (case sensitive)), as an alternative to
FileStorage::BASE64 flag.flags - Mode of operation. One of FileStorage::Modeencoding - Encoding of the file. Note that UTF-16 XML encoding is not supported currently and
you should use 8-bit encoding instead of it.@Cast(value="bool") public boolean open(@opencv_core.Str BytePointer filename, int flags)
@Cast(value="bool") public boolean open(@opencv_core.Str String filename, int flags, @opencv_core.Str String encoding)
@Cast(value="bool") public boolean open(@opencv_core.Str String filename, int flags)
@Cast(value="bool") public boolean isOpened()
public void release()
Call this method after all I/O operations with the storage are finished.
@opencv_core.Str public BytePointer releaseAndGetString()
Call this method after all I/O operations with the storage are finished. If the storage was opened for writing data and FileStorage::WRITE was specified
@ByVal public opencv_core.FileNode getFirstTopLevelNode()
@ByVal public opencv_core.FileNode root(int streamidx)
streamidx - Zero-based index of the stream. In most cases there is only one stream in the file.
However, YAML supports multiple streams and so there can be several.@ByVal public opencv_core.FileNode root()
@ByVal @Name(value="operator []") public opencv_core.FileNode get(@opencv_core.Str BytePointer nodename)
nodename - Name of the file node.@ByVal @Name(value="operator []") public opencv_core.FileNode get(@opencv_core.Str String nodename)
@ByVal @Name(value="operator []") public opencv_core.FileNode getNode(@Cast(value="const char*") BytePointer nodename)
@ByVal @Name(value="operator []") public opencv_core.FileNode getNode(String nodename)
@Name(value="operator *") public opencv_core.CvFileStorage multiply()
public void writeRaw(@opencv_core.Str BytePointer fmt, @Cast(value="const uchar*") BytePointer vec, @Cast(value="size_t") long len)
Writes one or more numbers of the specified format to the currently written structure. Usually it is
more convenient to use operator << instead of this method.
fmt - Specification of each array element, see \ref format_spec "format specification"vec - Pointer to the written array.len - Number of the uchar elements to write.public void writeRaw(@opencv_core.Str String fmt, @Cast(value="const uchar*") ByteBuffer vec, @Cast(value="size_t") long len)
public void writeRaw(@opencv_core.Str BytePointer fmt, @Cast(value="const uchar*") byte[] vec, @Cast(value="size_t") long len)
public void writeRaw(@opencv_core.Str String fmt, @Cast(value="const uchar*") BytePointer vec, @Cast(value="size_t") long len)
public void writeRaw(@opencv_core.Str BytePointer fmt, @Cast(value="const uchar*") ByteBuffer vec, @Cast(value="size_t") long len)
public void writeRaw(@opencv_core.Str String fmt, @Cast(value="const uchar*") byte[] vec, @Cast(value="size_t") long len)
public void writeObj(@opencv_core.Str BytePointer name, @Const Pointer obj)
name - Name of the written object.obj - Pointer to the object.for details.public void writeObj(@opencv_core.Str String name, @Const Pointer obj)
public void write(@opencv_core.Str BytePointer name, double val)
name - Name of the written objectval - Value of the written objectpublic void write(@opencv_core.Str String name, double val)
public void write(@opencv_core.Str BytePointer name, @opencv_core.Str BytePointer val)
public void write(@opencv_core.Str String name, @opencv_core.Str String val)
public void write(@opencv_core.Str BytePointer name, @ByVal opencv_core.Mat val)
public void write(@opencv_core.Str String name, @ByVal opencv_core.Mat val)
public void write(@opencv_core.Str BytePointer name, @ByVal opencv_core.UMat val)
public void write(@opencv_core.Str String name, @ByVal opencv_core.UMat val)
public void writeComment(@opencv_core.Str BytePointer comment, @Cast(value="bool") boolean append)
The function writes a comment into file storage. The comments are skipped when the storage is read.
comment - The written comment, single-line or multi-lineappend - If true, the function tries to put the comment at the end of current line.
Else if the comment is multi-line, or if it does not fit at the end of the current
line, the comment starts a new line.public void writeComment(@opencv_core.Str BytePointer comment)
public void writeComment(@opencv_core.Str String comment, @Cast(value="bool") boolean append)
public void writeComment(@opencv_core.Str String comment)
@opencv_core.Str public static BytePointer getDefaultObjectName(@opencv_core.Str BytePointer filename)
filename - Name of a file@opencv_core.Str public static String getDefaultObjectName(@opencv_core.Str String filename)
@opencv_core.Ptr public opencv_core.CvFileStorage fs()
public opencv_core.FileStorage fs(opencv_core.CvFileStorage fs)
@opencv_core.Str public BytePointer elname()
public opencv_core.FileStorage elname(BytePointer elname)
@Cast(value="char*") @StdVector public BytePointer structs()
public opencv_core.FileStorage structs(BytePointer structs)
public int state()
public opencv_core.FileStorage state(int state)
Copyright © 2017. All rights reserved.