-
data FileNotFoundException = pure native java.io.FileNotFoundException
-
-
data UnsupportedEncodingException = pure native java.io.UnsupportedEncodingException
-
-
data EOFException = pure native java.io.EOFException
-
Member Functions
-
new ∷ String → EOFException
pure native new
-
-
data OutputStream = native java.io.OutputStream
-
frege equivalent of java.io.OutputStream
-
data FileOutputStream = native java.io.FileOutputStream
-
frege equivalent of java.io.FileOutputStream
Member Functions
-
new ∷ MutableIO File → STMutable RealWorld FileOutputStream
throws FileNotFoundException
| MutableIO File → Bool → STMutable RealWorld FileOutputStream
throws FileNotFoundException
| String → STMutable RealWorld FileOutputStream
throws FileNotFoundException
| String → Bool → STMutable RealWorld FileOutputStream
throws FileNotFoundException
native new
-
FileOutputStream.new file true
writes to the end of a file rather than the beginning
-
new𝖆 ∷ MutableIO File → STMutable RealWorld FileOutputStream
native new throws FileNotFoundException overloads new
-
FileOutputStream.new file true
writes to the end of a file rather than the beginning
-
new𝖇 ∷ MutableIO File → Bool → STMutable RealWorld FileOutputStream
native new throws FileNotFoundException overloads new
-
FileOutputStream.new file true
writes to the end of a file rather than the beginning
-
new𝖈 ∷ String → STMutable RealWorld FileOutputStream
native new throws FileNotFoundException overloads new
-
FileOutputStream.new file true
writes to the end of a file rather than the beginning
-
new𝖉 ∷ String → Bool → STMutable RealWorld FileOutputStream
native new throws FileNotFoundException overloads new
-
FileOutputStream.new file true
writes to the end of a file rather than the beginning
-
write ∷ MutableIO FileOutputStream → Int → IO ()
native write throws IOException
-
Writes the specified byte to this file output stream.
-
data Closeable = native java.io.Closeable
-
frege equivalent of java.io.Closeable
Member Functions
-
close ∷ MutableIO Closeable → IO ()
native close throws IOException
-
-
data Flushable = native java.io.Flushable
-
frege equivalent of java.io.Flushable
Member Functions
-
flush ∷ MutableIO Flushable → IO ()
native flush throws IOException
-
-
data URI = pure native java.net.URI
-
forward declaration of URI
-
data File = native java.io.File
-
Member Functions
-
canRead ∷ MutableIO File → IO Bool
native canRead
-
-
canWrite ∷ MutableIO File → IO Bool
native canWrite
-
-
createTempFile ∷ String → String → STMutable RealWorld File
native java.io.File.createTempFile throws IOException
-
Create an empty file in the default temp directory.
createTempFile "abc" ".suffix"
The prefix must be at least 3 characters long!
-
delete ∷ MutableIO File → IO Bool
native delete
-
-
exists ∷ MutableIO File → IO Bool
native exists
-
-
getName ∷ MutableIO File → IO String
native getName
-
-
getParentFile ∷ MutableIO File → IO (Maybe (MutableIO File))
native getParentFile
-
-
getPath ∷ MutableIO File → IO String
native getPath
-
The (relative) path name. Not necessarily valid.
-
getPathF ∷ File → String
pure native getPath
-
-
isAbsolute ∷ MutableIO File → IO Bool
native isAbsolute
-
-
isDirectory ∷ MutableIO File → IO Bool
native isDirectory
-
-
isFile ∷ MutableIO File → IO Bool
native isFile
-
-
lastModified ∷ MutableIO File → IO Long
native lastModified
-
-
list ∷ MutableIO File → IO (Maybe (ArrayOf RealWorld String))
native list
-
-
mkdirs ∷ MutableIO File → IO Bool
native mkdirs
-
-
new ∷ String → STMutable s File
| Mutable s File → String → STMutable s File
native new
-
-
new𝖆 ∷ String → STMutable s File
native new overloads new
-
-
new𝖇 ∷ Mutable s File → String → STMutable s File
native new overloads new
-
-
pathSeparator ∷ String
pure native java.io.File.pathSeparator
-
Separator for elements of a path, i.e. ":" on Unix
-
renameTo ∷ MutableIO File → MutableIO File → IO Bool
native renameTo
-
-
separator ∷ String
pure native java.io.File.separator
-
Separator for elements of a path name, i.e. "/" on Unix
-
toURI ∷ File → URI
pure native toURI
-
-
data Writer = native java.io.Writer
-
Member Functions
-
putChar ∷ MutableIO Writer → Char → IO ()
-
-
write ∷ MutableIO Writer → Int → IO ()
throws IOException
| MutableIO Writer → String → IO ()
throws IOException
| MutableIO Writer → String → Int → Int → IO ()
throws IOException
native write
-
-
write𝖆 ∷ MutableIO Writer → Int → IO ()
native write throws IOException overloads write
-
-
write𝖇 ∷ MutableIO Writer → String → IO ()
native write throws IOException overloads write
-
-
write𝖈 ∷ MutableIO Writer → String → Int → Int → IO ()
native write throws IOException overloads write
-
-
data OutputStreamWriter = native java.io.OutputStreamWriter
-
Member Functions
-
new ∷ MutableIO OutputStream → String → STMutable RealWorld OutputStreamWriter
native new throws UnsupportedEncodingException
-
-
data PrintWriter = native java.io.PrintWriter
-
Member Functions
-
new ∷ String → STMutable RealWorld PrintWriter
throws FileNotFoundException
| MutableIO File → STMutable RealWorld PrintWriter
throws FileNotFoundException
| MutableIO File → String → STMutable RealWorld PrintWriter
throws FileNotFoundException, UnsupportedEncodingException
| MutableIO Writer → STMutable RealWorld PrintWriter
| MutableIO Writer → Bool → STMutable RealWorld PrintWriter
native new
-
-
new𝖆 ∷ String → STMutable RealWorld PrintWriter
native new throws FileNotFoundException overloads new
-
-
new𝖇 ∷ MutableIO File → STMutable RealWorld PrintWriter
native new throws FileNotFoundException overloads new
-
-
new𝖈 ∷ MutableIO File → String → STMutable RealWorld PrintWriter
native new throws FileNotFoundException, UnsupportedEncodingException overloads new
-
-
new𝖉 ∷ MutableIO Writer → STMutable RealWorld PrintWriter
native new overloads new
-
-
new𝖊 ∷ MutableIO Writer → Bool → STMutable RealWorld PrintWriter
native new overloads new
-
-
print ∷ MutableIO PrintWriter → String → IO ()
native print
-
print a String
-
printf ∷ MutableIO PrintWriter → String → a → IO ()
| MutableIO PrintWriter → String → a → b → IO ()
| MutableIO PrintWriter → String → a → b → c → IO ()
| MutableIO PrintWriter → String → a → b → c → d → IO ()
| MutableIO PrintWriter → String → a → b → c → d → e → IO ()
| MutableIO PrintWriter → String → a → b → c → d → e → f → IO ()
| MutableIO PrintWriter → String → a → b → c → d → e → f → g → IO ()
| MutableIO PrintWriter → String → a → b → c → d → e → f → g → h → IO ()
| MutableIO PrintWriter → String → a → b → c → d → e → f → g → h → i → IO ()
native printf
-
format and print 1 to 9 values, see StringJ.format
-
printf𝖆 ∷ MutableIO PrintWriter → String → a → IO ()
native printf overloads printf
-
format and print 1 to 9 values, see StringJ.format
-
printf𝖇 ∷ MutableIO PrintWriter → String → a → b → IO ()
native printf overloads printf
-
format and print 1 to 9 values, see StringJ.format
-
printf𝖈 ∷ MutableIO PrintWriter → String → a → b → c → IO ()
native printf overloads printf
-
format and print 1 to 9 values, see StringJ.format
-
printf𝖉 ∷ MutableIO PrintWriter → String → a → b → c → d → IO ()
native printf overloads printf
-
format and print 1 to 9 values, see StringJ.format
-
printf𝖊 ∷ MutableIO PrintWriter → String → a → b → c → d → e → IO ()
native printf overloads printf
-
format and print 1 to 9 values, see StringJ.format
-
printf𝖋 ∷ MutableIO PrintWriter → String → a → b → c → d → e → f → IO ()
native printf overloads printf
-
format and print 1 to 9 values, see StringJ.format
-
printf𝖌 ∷ MutableIO PrintWriter → String → a → b → c → d → e → f → g → IO ()
native printf overloads printf
-
format and print 1 to 9 values, see StringJ.format
-
printf𝖍 ∷ MutableIO PrintWriter → String → a → b → c → d → e → f → g → h → IO ()
native printf overloads printf
-
format and print 1 to 9 values, see StringJ.format
-
printf𝖎 ∷ MutableIO PrintWriter → String → a → b → c → d → e → f → g → h → i → IO ()
native printf overloads printf
-
format and print 1 to 9 values, see StringJ.format
-
println ∷ MutableIO PrintWriter → String → IO ()
| MutableIO PrintWriter → IO ()
native println
-
print a String followed by a line terminator, or just a line terminator
-
println𝖆 ∷ MutableIO PrintWriter → String → IO ()
native println overloads println
-
print a String followed by a line terminator, or just a line terminator
-
println𝖇 ∷ MutableIO PrintWriter → IO ()
native println overloads println
-
print a String followed by a line terminator, or just a line terminator
-
stdout ∷ MutableIO PrintWriter
native frege.runtime.Runtime.stdout.get()
-
nowarn: Don't warn because of constantness
The standard output PrintWriter
-
stderr ∷ MutableIO PrintWriter
native frege.runtime.Runtime.stderr.get()
-
nowarn: Don't warn because of constantness
The standard error PrintWriter
-
stdin ∷ MutableIO BufferedReader
native frege.runtime.Runtime.stdin.get()
-
nowarn: Don't warn because of constantness
The standard input BufferedReader
-
data StringWriter = native java.io.StringWriter
-
Frege type for a java.io.StringWriter
Not intended for direct use but rather as something a PrintWriter can be made of. (Though, because of the Appendable inheritance, one could still Appendable.append directly.)
To be used like:
action :: PrintWriter -> IO ()
action = ...
actionOnStringWriter :: IO String
actionOnStringWriter = do
sw <- StringWriter.new
pr <- sw.printer
action pr
pr.close
sw.toString
Member Functions
-
new ∷ () → STMutable s StringWriter
native new
-
create a fresh StringWriter
-
printer ∷ MutableIO StringWriter → STMutable RealWorld PrintWriter
-
make a PrintWriter that prints to this StringWriter
-
toString ∷ Mutable s StringWriter → ST s String
native toString
-
get the content of a StringWriter as String
-
data InputStream = native java.io.InputStream
-
-
data FileInputStream = native java.io.FileInputStream
-
Member Functions
-
new ∷ MutableIO File → STMutable RealWorld FileInputStream
throws FileNotFoundException
| String → STMutable RealWorld FileInputStream
throws FileNotFoundException
native new
-
-
new𝖆 ∷ MutableIO File → STMutable RealWorld FileInputStream
native new throws FileNotFoundException overloads new
-
-
new𝖇 ∷ String → STMutable RealWorld FileInputStream
native new throws FileNotFoundException overloads new
-
-
data Reader = native java.io.Reader
-
Member Functions
-
getChar ∷ MutableIO Reader → IO Char
-
Read the next character from the input stream. Throws EOFException if the end of the stream has been reached, or IOException if an I/O error occurs.
-
read ∷ MutableIO Reader → IO Int
native read throws IOException
-
Reads a single character and returns it as Int in the range 0 to 65535. Returns -1 if the end of the stream has been reached.
Throws IOException if an I/O error occurs.
-
data InputStreamReader = native java.io.InputStreamReader
-
Member Functions
-
new ∷ MutableIO InputStream → String → STMutable RealWorld InputStreamReader
native new throws UnsupportedEncodingException
-
-
data BufferedReader = native java.io.BufferedReader
-
Member Functions
-
getLine ∷ MutableIO BufferedReader → IO String
-
Reads the next line from a buffered reader using BufferedReader.readLine, and returns the string or throws EOFException on end of file.
-
getLines ∷ MutableIO BufferedReader → IO [String]
-
read all lines and return them as list, close reader afterwards
-
new ∷ MutableIO Reader → STMutable RealWorld BufferedReader
native new
-
-
readLine ∷ MutableIO BufferedReader → IO (Maybe String)
native readLine throws IOException
-
Reads a line of text. A line is considered to be terminated by any one of a line feed ("\n"), a carriage return ("\r"), or a carriage return followed immediately by a linefeed.
-
Returns:
-
Maybe.Just string, where
string is the contents of the line, not including any line-termination characters, or
Maybe.Nothing if the end of the stream has been reached.
-
Throws:
-
IOException - If an I/O error occurs
-
openReader ∷ String → STMutable RealWorld BufferedReader
-
Convenience function to open a file and wrap it with an UTF-8 decoding buffered Reader.
May throw FileNotFoundException
-
openWriter ∷ String → STMutable RealWorld PrintWriter
-
Convenience function to open a file for writing through an UTF-8 encoding PrintWriter.
-
appendWriter ∷ String → STMutable RealWorld PrintWriter
-
Convenience function to open a file in append mode for writing through an UTF-8 encoding PrintWriter.
May throw FileNotFoundException