org.eclipse.jgit.storage.dht
Class PackChunk.Members
java.lang.Object
org.eclipse.jgit.storage.dht.PackChunk.Members
- Enclosing class:
- PackChunk
public static class PackChunk.Members
- extends java.lang.Object
Constructs a PackChunk
while reading from the DHT.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PackChunk.Members
public PackChunk.Members()
getChunkKey
public ChunkKey getChunkKey()
- Returns:
- the chunk key. Never null.
setChunkKey
public PackChunk.Members setChunkKey(ChunkKey key)
- Parameters:
key
-
- Returns:
this
hasChunkData
public boolean hasChunkData()
- Returns:
- true if there is chunk data present.
getChunkData
public byte[] getChunkData()
- Returns:
- the chunk data, or null if not available.
getChunkDataAsByteBuffer
public java.nio.ByteBuffer getChunkDataAsByteBuffer()
- Returns:
- the chunk data, or null if not available.
setChunkData
public PackChunk.Members setChunkData(byte[] chunkData)
- Parameters:
chunkData
-
- Returns:
this
setChunkData
public PackChunk.Members setChunkData(byte[] chunkData,
int ptr,
int len)
- Parameters:
chunkData
- ptr
- len
-
- Returns:
this
hasChunkIndex
public boolean hasChunkIndex()
- Returns:
- true if there is a chunk index present.
getChunkIndex
public byte[] getChunkIndex()
- Returns:
- the chunk index, or null if not available.
getChunkIndexAsByteBuffer
public java.nio.ByteBuffer getChunkIndexAsByteBuffer()
- Returns:
- the chunk index, or null if not available.
setChunkIndex
public PackChunk.Members setChunkIndex(byte[] chunkIndex)
- Parameters:
chunkIndex
-
- Returns:
this
setChunkIndex
public PackChunk.Members setChunkIndex(byte[] chunkIndex,
int ptr,
int len)
- Parameters:
chunkIndex
- ptr
- len
-
- Returns:
this
hasMeta
public boolean hasMeta()
- Returns:
- true if there is meta information present.
getMeta
public GitStore.ChunkMeta getMeta()
- Returns:
- the inline meta data, or null if not available.
setMeta
public PackChunk.Members setMeta(GitStore.ChunkMeta meta)
- Parameters:
meta
-
- Returns:
this
build
public PackChunk build()
throws DhtException
- Returns:
- the PackChunk instance.
- Throws:
DhtException
- if early validation indicates the chunk data is corrupt
or not recognized by this version of the library.
Copyright © 2011. All Rights Reserved.