NASA World Wind

gov.nasa.worldwind.util
Class WWIO

java.lang.Object
  extended by gov.nasa.worldwind.util.WWIO

public class WWIO
extends Object


Field Summary
static String ILLEGAL_FILE_PATH_PART_CHARACTERS
           
 
Constructor Summary
WWIO()
           
 
Method Summary
static Proxy configureProxy()
           
static String formPath(String... pathParts)
           
static Object getFileOrResourceAsStream(String path, Class c)
           
static boolean isFileOutOfDate(URL url, long expiryTime)
           
static String makeSuffixForMimeType(String mimeType)
           
static MappedByteBuffer mapFile(File file)
           
static ByteBuffer readFileToBuffer(File file)
           
static ByteBuffer readStreamToBuffer(InputStream inputStream)
           
static ByteBuffer readURLContentToBuffer(URL url)
           
static ByteBuffer readZipEntryToBuffer(File zipFile, String entryName)
           
static String replaceSuffix(String in, String newSuffix)
           
static boolean saveBuffer(ByteBuffer buffer, File file)
           
static File saveBufferToTempFile(ByteBuffer buffer, String suffix)
           
static String stripIllegalFileNameCharacters(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ILLEGAL_FILE_PATH_PART_CHARACTERS

public static final String ILLEGAL_FILE_PATH_PART_CHARACTERS
See Also:
Constant Field Values
Constructor Detail

WWIO

public WWIO()
Method Detail

configureProxy

public static Proxy configureProxy()

formPath

public static String formPath(String... pathParts)

getFileOrResourceAsStream

public static Object getFileOrResourceAsStream(String path,
                                               Class c)

isFileOutOfDate

public static boolean isFileOutOfDate(URL url,
                                      long expiryTime)

makeSuffixForMimeType

public static String makeSuffixForMimeType(String mimeType)

mapFile

public static MappedByteBuffer mapFile(File file)
                                throws IOException
Throws:
IOException

readFileToBuffer

public static ByteBuffer readFileToBuffer(File file)
                                   throws IOException
Throws:
IOException

readStreamToBuffer

public static ByteBuffer readStreamToBuffer(InputStream inputStream)
                                     throws IOException
Throws:
IOException

readURLContentToBuffer

public static ByteBuffer readURLContentToBuffer(URL url)
                                         throws IOException
Throws:
IOException

readZipEntryToBuffer

public static ByteBuffer readZipEntryToBuffer(File zipFile,
                                              String entryName)
                                       throws IOException
Throws:
IOException

replaceSuffix

public static String replaceSuffix(String in,
                                   String newSuffix)

saveBuffer

public static boolean saveBuffer(ByteBuffer buffer,
                                 File file)
                          throws IOException
Throws:
IOException

saveBufferToTempFile

public static File saveBufferToTempFile(ByteBuffer buffer,
                                        String suffix)
                                 throws IOException
Throws:
IOException

stripIllegalFileNameCharacters

public static String stripIllegalFileNameCharacters(String s)

NASA World Wind