|
TrueZIP Kernel 7.0-rc1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.schlichtherle.truezip.socket.ByteArrayIOEntry
@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class) @NotThreadSafe public class ByteArrayIOEntry
An I/O entry which uses a byte array.
| Nested Class Summary | |
|---|---|
private class |
ByteArrayIOEntry.ByteArrayInputSocket
|
private class |
ByteArrayIOEntry.ByteArrayOutputSocket
|
private class |
ByteArrayIOEntry.DataOutputStream
|
| Nested classes/interfaces inherited from interface de.schlichtherle.truezip.entry.Entry |
|---|
Entry.Access, Entry.Size, Entry.Type |
| Field Summary | |
|---|---|
private byte[] |
data
|
(package private) int |
initialCapacity
|
private String |
name
|
private int |
reads
|
private int |
writes
|
| Fields inherited from interface de.schlichtherle.truezip.entry.Entry |
|---|
NULL, UNKNOWN |
| Constructor Summary | |
|---|---|
ByteArrayIOEntry(String name)
Equivalent to new ByteArrayIOPool(name, 32). |
|
ByteArrayIOEntry(String name,
int initialCapacity)
Constructs a new byte array I/O entry with the given name and initial capacity of the byte array for the next output to this I/O entry. |
|
| Method Summary | |
|---|---|
byte[] |
getData()
Returns the byte array for input from this I/O entry. |
InputSocket<ByteArrayIOEntry> |
getInputSocket()
Returns an input socket for reading this entry. |
String |
getName()
Returns the entry name. |
OutputSocket<ByteArrayIOEntry> |
getOutputSocket()
Returns an output socket for writing this entry. |
int |
getReads()
|
long |
getSize(Entry.Size type)
Returns the size of this entry. |
long |
getTime(Entry.Access type)
Returns the last access time of this entry. |
Entry.Type |
getType()
Returns the type of this entry or null if and only if this entry
does not exist. |
int |
getWrites()
|
void |
setData(byte[] data)
Sets the byte array for input from this I/O entry. |
void |
setInitialCapacity(int initialCapacity)
Sets the initial capacity of the byte array for the next output to this I/O entry. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private final String name
@CheckForNull private byte[] data
private int reads
private int writes
int initialCapacity
| Constructor Detail |
|---|
public ByteArrayIOEntry(String name)
new ByteArrayIOPool(name, 32).
public ByteArrayIOEntry(String name,
int initialCapacity)
name - the name of this entry.initialCapacity - the initial capacity of the array to use for
the next output to this I/O entry.| Method Detail |
|---|
public final void setInitialCapacity(int initialCapacity)
initialCapacity - the initial capacity of the array to use for
the next output to this I/O entry.@CheckForNull public byte[] getData()
null.
Note that the returned array is not copied, so beware of
concurrent modifications!
public void setData(@Nullable
byte[] data)
data - the byte array for input from this I/O entry.public int getReads()
public int getWrites()
public final String getName()
EntryEntryName.SEPARATOR_CHAR).
This implies that a segment cannot contain separator characters.
".") or
dot-dot ("..") segments which represent the current or
parent segment respectively.
"foo/bar/" and
"./abc/../foo/./def/./../bar/." both refer to the same entry
when being parsed.
getName in interface EntryEntryName.create(java.lang.String, java.lang.String)public Entry.Type getType()
Entrynull if and only if this entry
does not exist.
getType in interface Entrynull if and only if this entry
does not exist.public long getSize(Entry.Size type)
Entry
getSize in interface EntryEntry.UNKNOWN if not specified or the type is unsupported.
This method may not be meaningful for non-file entries.public long getTime(Entry.Access type)
Entry
getTime in interface Entrypublic InputSocket<ByteArrayIOEntry> getInputSocket()
InputEntryIOSocket.getLocalTarget() of the returned socket
must return this entry.
getInputSocket in interface InputEntry<ByteArrayIOEntry>public OutputSocket<ByteArrayIOEntry> getOutputSocket()
OutputEntryIOSocket.getLocalTarget() of the returned socket
must return this entry.
getOutputSocket in interface OutputEntry<ByteArrayIOEntry>public String toString()
toString in class Object
|
TrueZIP Kernel 7.0-rc1 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||