Java Doc for ArEntry.java in  » Swing-Library » jEdit » de » masters_of_disaster » ant » tasks » ar » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » jEdit » de.masters_of_disaster.ant.tasks.ar 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.masters_of_disaster.ant.tasks.ar.ArEntry

ArEntry
public class ArEntry implements ArConstants(Code)
This class represents an entry in an Ar archive. It consists of the entry's header, as well as the entry's File. Entries can be instantiated in one of three ways, depending on how they are to be used.

ArEntries that are created from the header bytes read from an archive are instantiated with the ArEntry( byte[] ) constructor. These entries will be used when extracting from or listing the contents of an archive. These entries have their header filled in using the header bytes. They also set the File to null, since they reference an archive entry not a file.

ArEntries that are created from Files that are to be written into an archive are instantiated with the ArEntry( File ) constructor. These entries have their header filled in using the File's information. They also keep a reference to the File for convenience when writing entries.

Finally, ArEntries can be constructed from nothing but a name. This allows the programmer to construct the entry by hand, for instance when only an InputStream is available for writing to the archive, and the header information is constructed from other information. In this case the header fields are set to defaults and the File is set to null.

The C structure for an Ar Entry's header is:

 struct header {
 char filename[16];
 char filedate[12];
 char uid[6];
 char gid[6];
 char mode[8];
 char size[10];
 char magic[2];
 } header;
 


Field Summary
final public static  intDEFAULT_FILE_MODE
    
final public static  intMILLIS_PER_SECOND
    

Constructor Summary
public  ArEntry(String name)
     Construct an entry with only a name.
public  ArEntry(File file)
     Construct an entry for a file.
public  ArEntry(byte[] headerBuf)
     Construct an entry from an archive's header bytes.

Method Summary
public  booleanequals(ArEntry it)
     Determine if the two entries are equal.
public  booleanequals(Object it)
     Determine if the two entries are equal.
public  FilegetFile()
     Get this entry's file.
public  DategetFileDate()
     Get this entry's modification time.
public  StringgetFilename()
     Get this entry's name.
public  intgetGroupId()
     Get this entry's group id.
public  intgetMode()
     Get this entry's mode.
public  longgetSize()
     Get this entry's file size.
public  intgetUserId()
     Get this entry's user id.
public  inthashCode()
     Hashcodes are based on entry names.
public  voidparseArHeader(byte[] header)
     Parse an entry's header information from a header buffer.
public  voidsetFileDate(long time)
     Set this entry's modification time.
public  voidsetFileDate(Date time)
     Set this entry's modification time.
public  voidsetFilename(String filename)
     Set this entry's name.
public  voidsetGroupId(int groupId)
     Set this entry's group id.
public  voidsetIds(int userId, int groupId)
     Convenience method to set this entry's group and user ids.
public  voidsetMode(int mode)
    
public  voidsetSize(long size)
     Set this entry's file size.
public  voidsetUserId(int userId)
     Set this entry's user id.
public  voidwriteEntryHeader(byte[] outbuf)
     Write an entry's header information to a header buffer.

Field Detail
DEFAULT_FILE_MODE
final public static int DEFAULT_FILE_MODE(Code)
Default permissions bits for files



MILLIS_PER_SECOND
final public static int MILLIS_PER_SECOND(Code)
Convert millis to seconds




Constructor Detail
ArEntry
public ArEntry(String name)(Code)
Construct an entry with only a name. This allows the programmer to construct the entry's header "by hand". File is set to null.
Parameters:
  name - the entry name



ArEntry
public ArEntry(File file)(Code)
Construct an entry for a file. File is set to file, and the header is constructed from information from the file.
Parameters:
  file - The file that the entry represents.



ArEntry
public ArEntry(byte[] headerBuf)(Code)
Construct an entry from an archive's header bytes. File is set to null.
Parameters:
  headerBuf - The header bytes from an ar archive entry.




Method Detail
equals
public boolean equals(ArEntry it)(Code)
Determine if the two entries are equal. Equality is determined by the header names being equal.
Parameters:
  it - Entry to be checked for equality. True if the entries are equal.



equals
public boolean equals(Object it)(Code)
Determine if the two entries are equal. Equality is determined by the header names being equal.
Parameters:
  it - Entry to be checked for equality. True if the entries are equal.



getFile
public File getFile()(Code)
Get this entry's file. This entry's file.



getFileDate
public Date getFileDate()(Code)
Get this entry's modification time. time This entry's new modification time.



getFilename
public String getFilename()(Code)
Get this entry's name. This entry's name.



getGroupId
public int getGroupId()(Code)
Get this entry's group id. This entry's group id.



getMode
public int getMode()(Code)
Get this entry's mode. This entry's mode.



getSize
public long getSize()(Code)
Get this entry's file size. This entry's file size.



getUserId
public int getUserId()(Code)
Get this entry's user id. This entry's user id.



hashCode
public int hashCode()(Code)
Hashcodes are based on entry names. the entry hashcode



parseArHeader
public void parseArHeader(byte[] header)(Code)
Parse an entry's header information from a header buffer.
Parameters:
  header - The ar entry header buffer to get information from.



setFileDate
public void setFileDate(long time)(Code)
Set this entry's modification time. The parameter passed to this method is in "Java time".
Parameters:
  time - This entry's new modification time.



setFileDate
public void setFileDate(Date time)(Code)
Set this entry's modification time.
Parameters:
  time - This entry's new modification time.



setFilename
public void setFilename(String filename)(Code)
Set this entry's name.
Parameters:
  name - This entry's new name.



setGroupId
public void setGroupId(int groupId)(Code)
Set this entry's group id.
Parameters:
  groupId - This entry's new group id.



setIds
public void setIds(int userId, int groupId)(Code)
Convenience method to set this entry's group and user ids.
Parameters:
  userId - This entry's new user id.
Parameters:
  groupId - This entry's new group id.



setMode
public void setMode(int mode)(Code)
Set the mode for this entry
Parameters:
  mode - the mode for this entry



setSize
public void setSize(long size)(Code)
Set this entry's file size.
Parameters:
  size - This entry's new file size.



setUserId
public void setUserId(int userId)(Code)
Set this entry's user id.
Parameters:
  userId - This entry's new user id.



writeEntryHeader
public void writeEntryHeader(byte[] outbuf)(Code)
Write an entry's header information to a header buffer.
Parameters:
  outbuf - The tar entry header buffer to fill in.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.