org.cloudfoundry.client.lib.archive
Interface ApplicationArchive.Entry

All Known Implementing Classes:
AbstractApplicationArchiveEntry
Enclosing interface:
ApplicationArchive

public static interface ApplicationArchive.Entry

A single entry contained within an ApplicationArchive. Entries are used to represent both files and directories.


Method Summary
 InputStream getInputStream()
          Returns the content of the entry or null if the entry is a directory.
 String getName()
          Returns the name of entry including a path.
 byte[] getSha1Digest()
          Returns a SHA1 digest over the contents of the entry or null if the entry is a directory.
 long getSize()
          Returns the size of entry or 0 if the entry is a directory.
 boolean isDirectory()
          Returns true if the entry represents a directory.
 

Method Detail

isDirectory

boolean isDirectory()
Returns true if the entry represents a directory.

Returns:
if the entry is a directory.

getName

String getName()
Returns the name of entry including a path. The '/' character should be used as a path separator. The name should never start with '/'.

Returns:
the name

getSize

long getSize()
Returns the size of entry or 0 if the entry is a directory.

Returns:
the size

getSha1Digest

byte[] getSha1Digest()
Returns a SHA1 digest over the contents of the entry or null if the entry is a directory.

Returns:
the SHA1 digest

getInputStream

InputStream getInputStream()
                           throws IOException
Returns the content of the entry or null if the entry is a directory. The caller is responsible for closing the stream.

Returns:
the file contents
Throws:
IOException


Copyright © 2013. All rights reserved.