com.supermap.data.processing
类 CompactFile
- java.lang.Object
-
- com.supermap.data.InternalHandle
-
- com.supermap.data.InternalHandleDisposable
-
- com.supermap.data.processing.CompactFile
-
- 所有已实现的接口:
- IDisposable
public class CompactFile extends com.supermap.data.InternalHandleDisposable
提供对紧凑缓存文件(.cf)读写的操作类。
-
-
构造器概要
构造器 构造器和说明 CompactFile()
构造CompactFile类的一个新对象。
-
方法概要
所有方法 静态方法 实例方法 具体方法 限定符和类型 方法和说明 boolean
Close()
关闭已打开的紧凑文件。int
Creat(String cfPath, int rowNum, int colNum, String pwd)
创建新的紧凑文件。void
dispose()
释放 CompactFile 对象占有的资源。byte[]
getAt(int row, int col)
从紧凑文件中读取数据。static byte[]
getData(String cfPath, String pwd, int row, int col)
int
Open(String cfPath, String pwd)
打开已有的紧凑文件。int
Open(String cfPath, String pwd, CompactFileOpenMode openmode)
int
remove(int row, int col)
int
SetAt(int row, int col, byte[] data)
向紧凑文件中写入数据。static void
setIsDisposable(com.supermap.data.InternalHandleDisposable obj, boolean disposable)
-
-
-
方法详细资料
-
dispose
public void dispose()
释放 CompactFile 对象占有的资源。
-
Creat
public int Creat(String cfPath, int rowNum, int colNum, String pwd)
创建新的紧凑文件。- 参数:
cfPath
- 紧凑文件路径名称。rowNum
- 紧凑文件中总的索引行数。colNum
- 紧凑文件中总的索引列数。pwd
- 紧凑文件密码。- 返回:
- 返回0则打开成功,否则失败。
-
Open
public int Open(String cfPath, String pwd)
打开已有的紧凑文件。- 参数:
cfPath
- 紧凑文件路径名称。pwd
- 紧凑文件密码。- 返回:
- 返回0则打开成功,否则失败。
-
Open
public int Open(String cfPath, String pwd, CompactFileOpenMode openmode)
-
Close
public boolean Close()
关闭已打开的紧凑文件。- 返回:
- 返回true则关闭成功,否则失败。
-
SetAt
public int SetAt(int row, int col, byte[] data)
向紧凑文件中写入数据。- 参数:
row
- 紧凑文件中对应的索引行(必须小于总行数)。col
- 紧凑文件中对应的索引列(必须小于总列数)。data
- 写入的数据。- 返回:
- 返回0则写入成功,否则失败。
-
getAt
public byte[] getAt(int row, int col)
从紧凑文件中读取数据。- 参数:
row
- 紧凑文件中对应的索引行(必须小于总行数)。col
- 紧凑文件中对应的索引列(必须小于总列数)。- 返回:
- 返回读取的数据,读取失败则为null。
-
remove
public int remove(int row, int col)
-
setIsDisposable
public static void setIsDisposable(com.supermap.data.InternalHandleDisposable obj, boolean disposable)
-
-
Copyright © 2021–2024 SuperMap. All rights reserved.