public class RegHeader extends Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_NAME_LENGTH |
static int |
REG_FORMAT_VERSION |
static long |
REG_MAGIC |
static int |
SIZE
Size in bytes of the header
|
Modifier and Type | Method and Description |
---|---|
RegAccessMode |
getAccessMode() |
long |
getCoverageLocation() |
long |
getLastSessionLocation() |
String |
getName() |
int |
getSlotCount() |
long |
getVersion() |
static RegHeader |
readFrom(File registryFile)
Read the registry header.
|
protected static RegHeader |
readFrom(com.atlassian.clover.registry.format.RegHeader.HeaderInputSource dis)
Read header using an abstraction on the underlying data source.
|
static RegHeader |
readFrom(String name,
FileChannel channel)
Read the registry header via a NIO FileChannel.
|
void |
write(FileChannel channel) |
public static final long REG_MAGIC
public static final int REG_FORMAT_VERSION
public static final int MAX_NAME_LENGTH
public static final int SIZE
public RegAccessMode getAccessMode()
public int getSlotCount()
public long getVersion()
public long getLastSessionLocation()
public long getCoverageLocation()
public String getName()
public static RegHeader readFrom(File registryFile) throws IOException, RegistryFormatException
registryFile
- the registry fileIOException
- if an unexpected IO problem occurs while readingRegistryFormatException
- if a known registry problem is encounteredpublic static RegHeader readFrom(String name, FileChannel channel) throws IOException, RegistryFormatException
name
- the name of the registry filechannel
- the file channel from which to readIOException
- if an unexpected IO problem occurs while readingRegistryFormatException
- if a known registry problem is encounteredprotected static RegHeader readFrom(com.atlassian.clover.registry.format.RegHeader.HeaderInputSource dis) throws IOException, RegistryFormatException
IOException
RegistryFormatException
public void write(FileChannel channel) throws IOException
IOException
Copyright © 2023 OpenClover.org. All rights reserved.