View Javadoc

1   /*
2    * Copyright 2006 Thomas Peuss
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.apache.org/licenses/LICENSE-2.0
9    * 
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13   * or implied. See the License for the specific language governing
14   * permissions and limitations under the License.
15   */
16  package logtail.logfile;
17  
18  import java.io.File;
19  import java.net.URI;
20  import java.util.Date;
21  
22  import logtail.config.LogSourceConfig;
23  
24  public class LogFile extends File {
25  	private LogSourceConfig config;
26  	
27  	public LogFile(File arg0, String arg1) {
28  		super(arg0, arg1);
29  		// TODO Auto-generated constructor stub
30  	}
31  
32  	public LogFile(String arg0, String arg1) {
33  		super(arg0, arg1);
34  		// TODO Auto-generated constructor stub
35  	}
36  
37  	public LogFile(String arg0) {
38  		super(arg0);
39  		// TODO Auto-generated constructor stub
40  	}
41  
42  	public LogFile(URI arg0) {
43  		super(arg0);
44  		// TODO Auto-generated constructor stub
45  	}
46  	
47  	public Date getLastModificationDate() {
48  		return new Date(this.lastModified());
49  	}
50  	
51  	public Long getLength() {
52  		return new Long(this.length());
53  	}
54  	
55  	public Boolean getReadable() {
56  		return new Boolean(this.canRead());
57  	}
58  
59  	public LogSourceConfig getConfig() {
60  		return config;
61  	}
62  
63  	public void setConfig(LogSourceConfig config) {
64  		this.config = config;
65  	}
66  }