Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

RSE
Release 3.0

org.eclipse.rse.services.clientserver.archiveutils
Class TarFile


java.lang.Object
  extended by 
org.eclipse.rse.services.clientserver.archiveutils.TarFile

public class TarFile
extends Object

This class is used to read entries from a tar file.

Since:
3.0

Constructor Summary
TarFile ( File file)
          Opens a tar file for reading given the specified File object.
TarFile ( String name)
          Opens a tar file for reading given the file name.
 
Method Summary
  Enumeration entries ()
          Returns an enumeration of the tar file entries.
  TarEntry getEntry ( String name)
          Returns the tar file entry with that name, or null if not found.
protected   InputStream getInputStream ()
          Gets the input stream for the tar file.
  InputStream getInputStream ( TarEntry entry)
          Returns the input stream of the data in the given entry.
 int size ()
          Returns the number of entries in the tar file.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TarFile

public TarFile(
File file)
        throws 
FileNotFoundException,
               
IOException
Opens a tar file for reading given the specified File object.

Parameters:
file - the tar file to be opened for reading.
Throws:
FileNotFoundException - if the file does not exist.
IOException - if an I/O error occurs.

TarFile

public TarFile(
String name)
        throws 
FileNotFoundException,
               
IOException
Opens a tar file for reading given the file name.

Parameters:
name - the name of the tar file to be opened for reading.
Throws:
FileNotFoundException - if the file with the given name does not exist.
IOException - if an I/O error occurs.
Method Detail

getInputStream

protected 
InputStream getInputStream()
                              throws 
FileNotFoundException
Gets the input stream for the tar file.

Returns:
the input stream for the tar file.
Throws:
FileNotFoundException - if the file does not exist.
Since:
3.0

entries

public 
Enumeration entries()
Returns an enumeration of the tar file entries.

Returns:
an enumeration of the tar file entries.

size

public int size()
Returns the number of entries in the tar file.

Returns:
the number of entries in the tar file.

getEntry

public 
TarEntry getEntry(
String name)
Returns the tar file entry with that name, or null if not found.

Parameters:
name - the name of the entry.
Returns:
the tar file entry, or null if not found.

getInputStream

public 
InputStream getInputStream(
TarEntry entry)
                           throws 
IOException
Returns the input stream of the data in the given entry.

Parameters:
entry - the entry.
Returns:
the input stream containing the data in that entry.
Throws:
IOException - if an I/O error occurs.

RSE
Release 3.0

Copyright (c) IBM Corporation and others 2000, 2008. All Rights Reserved.

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire