public abstract class Record extends java.lang.Object implements GenericRecord
Constructor and Description |
---|
Record() |
Modifier and Type | Method and Description |
---|---|
static Record |
buildRecordAtOffset(byte[] b, int offset)
Build and return the Record at the given offset.
(在给定的偏移量处构建并返回记录。)
|
static Record |
createRecordForType(long type, byte[] b, int start, int len)
For a given type (little endian bytes 3 and 4 in record header), byte array, start position and length: will return a Record object that will handle that record Remember that while PPT stores the record lengths as 8 bytes short (not including the size of the header), this code assumes you're passing in corrected lengths
(对于给定的类型(记录头中的小端字节 3 和 4),字节数组、起始位置和长度:将返回一个记录对象来处理该记录请记住,虽然 PPT 将记录长度存储为 8 个短字节(不包括标题的大小),此代码假定您正在传递正确的长度)
|
static Record[] |
findChildRecords(byte[] b, int start, int len)
Default method for finding child records of a container record
(查找容器记录的子记录的默认方法)
|
abstract Record[] |
getChildRecords()
Fetch all the child records of this record If this record is an atom, will return null If this record is a non-atom, but has no children, will return an empty array
(获取该记录的所有子记录 如果该记录是原子,将返回 null 如果该记录是非原子,但没有子记录,将返回一个空数组)
|
java.util.List<Record> |
getGenericChildren() |
java.lang.Enum |
getGenericRecordType() |
abstract long |
getRecordType()
Returns the type (held as a little endian in bytes 3 and 4) that this class handles
(返回此类处理的类型(在字节 3 和 4 中保持为小端序))
|
abstract boolean |
isAnAtom()
Is this record type an Atom record (only has data), or is it a non-Atom record (has other records)?
(这个记录类型是 Atom 记录(只有数据),还是非 Atom 记录(有其他记录)?)
|
static void |
writeLittleEndian(int i, java.io.OutputStream o)
When writing out, write out a signed int (32bit) in Little Endian format
(写出时,以 Little Endian 格式写出一个有符号的 int (32bit))
|
static void |
writeLittleEndian(short s, java.io.OutputStream o)
When writing out, write out a signed short (16bit) in Little Endian format
(写出时,以 Little Endian 格式写出有符号的短片(16 位))
|
abstract void |
writeOut(java.io.OutputStream o)
Have the contents printer out into an OutputStream, used when writing a file back out to disk (Normally, atom classes will keep their bytes around, but non atom classes will just request the bytes from their children, then chuck on their header and return)
(将内容打印机输出到 OutputStream 中,在将文件写回磁盘时使用(通常,原子类将保留它们的字节,但非原子类只会从它们的子类请求字节,然后夹在它们的标题上并返回))
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getGenericProperties
protected static final POILogger logger
public abstract boolean isAnAtom()
public abstract long getRecordType()
public abstract Record[] getChildRecords()
public abstract void writeOut(java.io.OutputStream o) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public java.lang.Enum getGenericRecordType()
getGenericRecordType
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericRecordType)
public java.util.List<Record> getGenericChildren()
getGenericChildren
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericChildren)
public static void writeLittleEndian(int i, java.io.OutputStream o) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public static void writeLittleEndian(short s, java.io.OutputStream o) throws java.io.IOException
java.io.IOException
(java.io.IOException)
public static Record buildRecordAtOffset(byte[] b, int offset)
b
- The byte array to build from
(b - 要构建的字节数组)
offset
- The offset to build at
(offset - 要构建的偏移量)
public static Record[] findChildRecords(byte[] b, int start, int len)
public static Record createRecordForType(long type, byte[] b, int start, int len)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.