1 package org.apache.lucene.store; 2 import java.io.RandomAccessFile ; 3 import java.io.IOException ; 4 5 8 public class _TestHelper { 9 10 13 public static boolean isFSInputStream(InputStream is) { 14 return is instanceof FSInputStream; 15 } 16 17 20 public static boolean isFSInputStreamClone(InputStream is) { 21 if (isFSInputStream(is)) { 22 return ((FSInputStream) is).isClone; 23 } else { 24 return false; 25 } 26 } 27 28 35 public static boolean isFSInputStreamOpen(InputStream is) 36 throws IOException 37 { 38 if (isFSInputStream(is)) { 39 FSInputStream fis = (FSInputStream) is; 40 return fis.isFDValid(); 41 } else { 42 return false; 43 } 44 } 45 46 } 47 | Popular Tags |