public class ChunksList extends Object
chunks include all chunks, but IDAT is a single pseudo chunk without data
Modifier and Type | Field and Description |
---|---|
static int |
CHUNK_GROUP_0_IDHR |
static int |
CHUNK_GROUP_1_AFTERIDHR |
static int |
CHUNK_GROUP_2_PLTE |
static int |
CHUNK_GROUP_3_AFTERPLTE |
static int |
CHUNK_GROUP_4_IDAT |
static int |
CHUNK_GROUP_5_AFTERIDAT |
static int |
CHUNK_GROUP_6_END |
Constructor and Description |
---|
ChunksList(ImageInfo imfinfo) |
Modifier and Type | Method and Description |
---|---|
void |
appendReadChunk(PngChunk chunk,
int chunkGroup)
Adds chunk in next position.
|
List<? extends PngChunk> |
getById(String id)
All chunks with this ID
|
List<? extends PngChunk> |
getById(String id,
String innerid)
If innerid!=null and the chunk is PngChunkTextVar or PngChunkSPLT, it's filtered by that id
|
PngChunk |
getById1(String id)
Returns only one chunk
|
PngChunk |
getById1(String id,
boolean failIfMultiple)
Returns only one chunk or null if nothing found - does not include queued
|
PngChunk |
getById1(String id,
String innerid,
boolean failIfMultiple)
Returns only one chunk or null if nothing found - does not include queued
|
List<PngChunk> |
getChunks()
WARNING: this does NOT return a copy, but the list itself.
|
List<PngChunk> |
getEquivalent(PngChunk c2)
Finds all chunks "equivalent" to this one
|
protected static List<PngChunk> |
getXById(List<PngChunk> list,
String id,
String innerid) |
String |
toString() |
String |
toStringFull()
for debugging
|
public static final int CHUNK_GROUP_0_IDHR
public static final int CHUNK_GROUP_1_AFTERIDHR
public static final int CHUNK_GROUP_2_PLTE
public static final int CHUNK_GROUP_3_AFTERPLTE
public static final int CHUNK_GROUP_4_IDAT
public static final int CHUNK_GROUP_5_AFTERIDAT
public static final int CHUNK_GROUP_6_END
public ChunksList(ImageInfo imfinfo)
public List<PngChunk> getChunks()
public void appendReadChunk(PngChunk chunk, int chunkGroup)
public List<? extends PngChunk> getById(String id)
id
- public List<? extends PngChunk> getById(String id, String innerid)
id
- public PngChunk getById1(String id)
id
- public PngChunk getById1(String id, boolean failIfMultiple)
If more than one chunk is found, then an exception is thrown (failifMultiple=true or chunk is single) or the last one is returned (failifMultiple=false)
public PngChunk getById1(String id, String innerid, boolean failIfMultiple)
If more than one chunk (after filtering by inner id) is found, then an exception is thrown (failifMultiple=true or chunk is single) or the last one is returned (failifMultiple=false)
public List<PngChunk> getEquivalent(PngChunk c2)
c2
- public String toStringFull()
Copyright © 2014. All rights reserved.