01: /**
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */package com.tc.util.runtime;
04:
05: /**
06: * @author teck
07: */
08: public class IOFlavor {
09:
10: private static boolean forceJDK13 = false;
11:
12: public static void forceJDK13() {
13: forceJDK13 = true;
14: }
15:
16: public static boolean isNioAvailable() {
17: if (forceJDK13) {
18: return false;
19: }
20:
21: try {
22: Class.forName("java.nio.ByteBuffer");
23: } catch (ClassNotFoundException e) {
24: return false;
25: }
26:
27: return true;
28: }
29:
30: }
|