root / branches / Mobile_Compatible_Hito_1 / libFMap / src-comp / org / gvsig / datasources / impljse / ImplJ2SE.java @ 21606
History | View | Annotate | Download (1.45 KB)
1 |
package org.gvsig.datasources.impljse; |
---|---|
2 |
|
3 |
import java.io.File; |
4 |
import java.io.FileNotFoundException; |
5 |
import java.io.IOException; |
6 |
|
7 |
import org.apache.log4j.Logger; |
8 |
import org.gvsig.datasources.common.IBigByteBuffer; |
9 |
import org.gvsig.datasources.common.IByteBuffer; |
10 |
import org.gvsig.datasources.common.ICharset; |
11 |
import org.gvsig.datasources.common.IRandomAccessFile; |
12 |
import org.gvsig.datasources.common.IRandomFileChannel; |
13 |
import org.gvsig.datasources.impljme.Impl; |
14 |
import org.gvsig.datasources.impljse.CharsetJSE; |
15 |
|
16 |
|
17 |
public class ImplJ2SE { |
18 |
|
19 |
private static Logger logger = Logger.getLogger(Impl.class); |
20 |
|
21 |
public static IByteBuffer wrap(byte[] bytesCachedRecord) { |
22 |
return new ByteBufferJSE(bytesCachedRecord); |
23 |
} |
24 |
|
25 |
public static IRandomAccessFile getRandomAccessFile(File f, String mode) throws FileNotFoundException { |
26 |
return new RandomAccessFileJSE(f, mode); |
27 |
} |
28 |
|
29 |
public static IBigByteBuffer getBigByteBuffer(IRandomFileChannel channel, int mode) throws IOException { |
30 |
return new BigByteBufferJSE(channel, mode); |
31 |
} |
32 |
|
33 |
public static IRandomFileChannel getRandomFileChannel(File file) throws FileNotFoundException { |
34 |
return new RandomFileChannelJSE(file); |
35 |
} |
36 |
|
37 |
public static IByteBuffer allocateDirect(int l) { |
38 |
return new ByteBufferJSE(l); |
39 |
} |
40 |
|
41 |
public static IRandomFileChannel getRandomFileChannel(String fp) throws FileNotFoundException { |
42 |
return new RandomFileChannelJSE(fp); |
43 |
} |
44 |
|
45 |
public static ICharset getCharsetForName(String str) { |
46 |
return new CharsetJSE(str); |
47 |
} |
48 |
|
49 |
} |