|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sam.core.ArchiveLayout.Resource
Specific resources in the jar archive.
Field Summary | |
protected int |
compressionMethod
The preferred compression method for this resource |
boolean |
isOptionnal
Wether this resource must always be present in the archive |
java.lang.String |
name
The entry name of this resource |
java.lang.String |
title
A human-readable description of this resource |
Method Summary | |
java.io.InputStream |
get()
Opens this Resource from the boot-time jar file assumed to be the archive |
java.io.InputStream |
get(java.util.zip.ZipFile archive)
Opens this Resource from specified archive |
byte[] |
getBytes(java.util.zip.ZipFile archive)
Reads this Resource as a byte[] array |
int |
getInt(java.util.zip.ZipFile archive)
Reads this Resource as a int number |
long |
getLong(java.util.zip.ZipFile archive)
Reads this Resource as a long number |
java.lang.String |
getString(java.util.zip.ZipFile archive)
Reads this Resource as a String |
java.lang.String[] |
getStrings(java.util.zip.ZipFile archive)
Reads this Resource line-by-line as a String[] array |
java.io.OutputStream |
put(java.util.jar.JarOutputStream jar)
Opens this Resource from specified archive |
void |
putBytes(byte[] content,
java.util.jar.JarOutputStream jar)
Writes this Resource line-by-line as a byte[] array |
void |
putInputStream(java.io.InputStream content,
java.util.jar.JarOutputStream jar)
Writes this Resource as an InputStream |
void |
putInt(int content,
java.util.jar.JarOutputStream jar)
Writes this Resource as a int number |
void |
putLong(long content,
java.util.jar.JarOutputStream jar)
Writes this Resource as a long number |
void |
putString(java.lang.String content,
java.util.jar.JarOutputStream jar)
Writes this Resource as a String |
void |
putStrings(java.lang.String[] content,
java.util.jar.JarOutputStream jar)
Writes this Resource line-by-line as a String[] array |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public final java.lang.String name
public final java.lang.String title
public final boolean isOptionnal
protected final int compressionMethod
java.util.zip.Zip.ZipEntry
Method Detail |
public java.lang.String toString()
toString
in class java.lang.Object
public java.io.InputStream get() throws java.io.IOException
Resource
from the boot-time jar file assumed to be the archive
java.io.IOException
public java.io.InputStream get(java.util.zip.ZipFile archive) throws java.io.IOException
Resource
from specified archive
archive
- the archive to read from
java.io.IOException
public java.lang.String getString(java.util.zip.ZipFile archive)
Resource
as a String
archive
- the archive to read from
null
in case of I/O errorpublic java.lang.String[] getStrings(java.util.zip.ZipFile archive)
Resource
line-by-line as a String[]
array
archive
- the archive to read from
new String[0]
in case of I/O errorpublic long getLong(java.util.zip.ZipFile archive) throws java.lang.NumberFormatException
Resource
as a long
number
archive
- the archive to read from
0
in case of I/O error
java.lang.NumberFormatException
public int getInt(java.util.zip.ZipFile archive) throws java.lang.NumberFormatException
Resource
as a int
number
archive
- the archive to read from
0
in case of I/O error
java.lang.NumberFormatException
public byte[] getBytes(java.util.zip.ZipFile archive)
Resource
as a byte[]
array
archive
- the archive to read from
null
in case of I/O errorpublic java.io.OutputStream put(java.util.jar.JarOutputStream jar)
Resource
from specified archive
public void putLong(long content, java.util.jar.JarOutputStream jar)
Resource
as a long
number
public void putInt(int content, java.util.jar.JarOutputStream jar)
Resource
as a int
number
public void putString(java.lang.String content, java.util.jar.JarOutputStream jar)
Resource
as a String
public void putStrings(java.lang.String[] content, java.util.jar.JarOutputStream jar)
Resource
line-by-line as a String[]
array
public void putInputStream(java.io.InputStream content, java.util.jar.JarOutputStream jar)
Resource
as an InputStream
public void putBytes(byte[] content, java.util.jar.JarOutputStream jar)
Resource
line-by-line as a byte[]
array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |