1 11 package org.eclipse.ui.internal.wizards.datatransfer; 12 13 18 public class TarEntry implements Cloneable 19 { 20 private String name; 21 private long mode, time, size; 22 private int type; 23 int filepos; 24 25 28 public static final int FILE = '0'; 29 30 33 public static final int DIRECTORY = '5'; 34 35 42 TarEntry(String name, int pos) { 43 this.name = name; 44 mode = 0644; 45 type = FILE; 46 filepos = pos; 47 time = System.currentTimeMillis() / 1000; 48 } 49 50 55 public TarEntry(String name) { 56 this(name, -1); 57 } 58 59 65 public int getFileType() { 66 return type; 67 } 68 69 74 public long getMode() { 75 return mode; 76 } 77 78 83 public String getName() { 84 return name; 85 } 86 87 92 public long getSize() { 93 return size; 94 } 95 96 102 public long getTime() { 103 return time; 104 } 105 106 112 public void setFileType(int type) { 113 this.type = type; 114 } 115 116 121 public void setMode(long mode) { 122 this.mode = mode; 123 } 124 125 130 public void setSize(long size) { 131 this.size = size; 132 } 133 134 140 public void setTime(long time) { 141 this.time = time; 142 } 143 } 144 | Popular Tags |