Class IoModule
java.lang.Object
com.googlecode.aviator.runtime.module.IoModule
A simple io module for aviator
- Author:
- dennis(killme2008@gmail.com)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic booleanstatic booleanstatic final FileA function to return java.io.File instance by path.static File[]static InputStreaminputStream(File file) static InputStreaminputStream(URL url) static FileOutputStreamoutputStream(File file) intread(InputStream in) static BufferedReaderstatic BufferedReaderstatic BufferedReaderreader(InputStream in) static BufferedReaderreader(InputStream in, String charsetName) static final URLstatic com.googlecode.aviator.runtime.module.LineSequenceseq(BufferedReader reader) static com.googlecode.aviator.runtime.module.LineSequencecast a file into a sequence of text lines in file.static Stringstatic Stringstatic Stringslurp function to read file fully as a string.static Stringstatic Stringstatic Stringstatic voidstatic voidstatic voidspit function to write a string fully to file.static voidvoidwrite(OutputStream out, int b) static BufferedWriterstatic BufferedWriterstatic BufferedWriterwriter(OutputStream out) static BufferedWriterwriter(OutputStream out, String charsetName)
-
Constructor Details
-
IoModule
public IoModule()
-
-
Method Details
-
file
-
exists
-
files
-
resource
-
inputStream
- Throws:
IOException
-
inputStream
- Throws:
IOException
-
outputStream
- Throws:
FileNotFoundException
-
read
- Throws:
IOException
-
write
- Throws:
IOException
-
reader
- Throws:
IOException
-
reader
- Throws:
IOException
-
reader
- Throws:
IOException
-
reader
- Throws:
IOException
-
writer
- Throws:
IOException
-
writer
- Throws:
IOException
-
writer
- Throws:
IOException
-
writer
- Throws:
IOException
-
slurp
slurp function to read file fully as a string.- Parameters:
path-- Returns:
- Throws:
IOException
-
slurp
- Throws:
IOException
-
slurp
- Throws:
IOException
-
delete
-
slurp
- Throws:
IOException
-
slurp
- Throws:
IOException
-
slurp
- Throws:
IOException
-
spit
spit function to write a string fully to file.- Parameters:
path-- Throws:
IOException
-
spit
- Throws:
IOException
-
spit
- Throws:
IOException
-
spit
- Throws:
IOException
-
seq
cast a file into a sequence of text lines in file.- Parameters:
file-- Returns:
- Throws:
IOException
-
seq
-
close
-