KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > j2me > io > File


1 /*
2  * Javolution - Java(TM) Solution for Real-Time and Embedded Systems
3  * Copyright (C) 2005 - Javolution (http://javolution.org/)
4  * All rights reserved.
5  *
6  * Permission to use, copy, modify, and distribute this software is
7  * freely granted, provided that this notice is preserved.
8  */

9 package j2me.io;
10
11 import j2me.lang.UnsupportedOperationException;
12
13 /**
14  * Class provided for the sole purpose of compiling the FileFilter and
15  * FilenameFilter interfaces.
16  */

17 public class File {
18
19     public static final String JavaDoc separator = System.getProperty("file.separator");
20
21     public static final char separatorChar = separator.charAt(0);
22
23     public static final String JavaDoc pathSeparator = System
24             .getProperty("path.separator");
25
26     public static final char pathSeparatorChar = pathSeparator.charAt(0);
27
28     private String JavaDoc _path;
29
30     public File(String JavaDoc path) {
31         _path = path;
32     }
33
34     public String JavaDoc getPath() {
35         return _path;
36     }
37     
38     public boolean exists() {
39         throw new UnsupportedOperationException JavaDoc(
40                 "File operations not supported for J2ME build");
41     }
42
43     public boolean isDirectory() {
44         throw new UnsupportedOperationException JavaDoc(
45                 "File operations not supported for J2ME build");
46     }
47
48     public String JavaDoc getName() {
49         throw new UnsupportedOperationException JavaDoc(
50                 "File operations not supported for J2ME build");
51     }
52
53     public File[] listFiles() {
54         throw new UnsupportedOperationException JavaDoc(
55                 "File operations not supported for J2ME build");
56     }
57 }
Popular Tags