svn-gvsig-desktop / branches / Mobile_Compatible_Hito_1 / libFMap_mobile_shp_driver / src-comp / org / gvsig / datasources / impljse / ImplJ2SE.java @ 21927
History | View | Annotate | Download (1.4 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 |
|
15 |
|
16 |
public class ImplJ2SE { |
17 |
|
18 |
private static Logger logger = Logger.getLogger(Impl.class); |
19 |
|
20 |
public static IByteBuffer wrap(byte[] bytesCachedRecord) { |
21 |
return new ByteBufferJSE(bytesCachedRecord); |
22 |
} |
23 |
|
24 |
public static IRandomAccessFile getRandomAccessFile(File f, String mode) throws FileNotFoundException { |
25 |
return new RandomAccessFileJSE(f, mode); |
26 |
} |
27 |
|
28 |
public static IBigByteBuffer getBigByteBuffer(IRandomFileChannel channel, int mode) throws IOException { |
29 |
return new BigByteBufferJSE(channel, mode); |
30 |
} |
31 |
|
32 |
public static IRandomFileChannel getRandomFileChannel(File file) throws FileNotFoundException { |
33 |
return new RandomFileChannelJSE(file); |
34 |
} |
35 |
|
36 |
public static IByteBuffer allocateDirect(int l) { |
37 |
return new ByteBufferJSE(l); |
38 |
} |
39 |
|
40 |
public static IRandomFileChannel getRandomFileChannel(String fp) throws FileNotFoundException { |
41 |
return new RandomFileChannelJSE(fp); |
42 |
} |
43 |
|
44 |
public static ICharset getCharsetForName(String str) { |
45 |
return new CharsetJSE(str); |
46 |
} |
47 |
|
48 |
} |