Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewParseError ¶
NewParseError returns a new ParseError instance. The parameter blockIndex represents index of the block whose bitmap failed to parse The parameter err is the underlying error for parse failure.
Types ¶
type BitMap ¶
type BitMap struct { Length int32 // contains filtered or unexported fields }
BitMap type represents 'bitmap section' of a block.
func NewBitMapFromByteSlice ¶
NewBitMapFromByteSlice creates a new BitMap, b is the byte slice that needs to be used as bitmap source. The caller should not reuse this byte slice anymore.
func NewBitMapFromByteSliceCopy ¶
NewBitMapFromByteSliceCopy creates a new BitMap, b is the byte slice that needs to be used as bitmap source. The caller can reuse the byte slice as this method creates a copy of it.
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory type is used to create BitMap instance by reading 'bitmap section' of a block.
func NewFactory ¶
func NewFactory(vhdReader *reader.VhdReader, blockAllocationTable *bat.BlockAllocationTable) *Factory
NewFactory creates a new instance of Factory, which can be used to create a BitMap instance by reading the 'bitmap section' of a block. vhdReader is the reader to read the disk, blockAllocationTable wraps the disk's BAT table, which has one entry per block, this is used to retrieve the absolute offset to the beginning of the 'bitmap section' of a block and the size of the 'bitmap section'.
type ParseError ¶
type ParseError struct { BlockIndex uint32 // contains filtered or unexported fields }
ParseError is the error type representing parsing error of a block's bitmap.
func (*ParseError) Error ¶
func (e *ParseError) Error() string
Error returns the string representation of the BitmapParseError instance.
func (*ParseError) GetInnerErr ¶
func (e *ParseError) GetInnerErr() error
GetInnerErr returns the inner error, this method satisfies InnerErr interface