|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.me.utils.SysUtil | +--iaik.me.utils.SysUtilME
Method Summary | |
Reader |
spiGetLineReader(Reader reader)
Returns a an availibel LineReader. |
Writer |
spiGetLineWriter(Writer writer)
In case of the J2SE it turns the Writer into a PrintWriter. |
boolean |
spiLoadLibrary(String libraryName)
Loads a native code library. |
void |
spiNextBytes(Random random,
byte[] data)
Returns an array of random bytes, the CLDC spec. defines only functions for int- and long type arrays. |
InputStream |
spiOpenFileInputStream(String filename)
Opens an InputStream to a given file. |
OutputStream |
spiOpenFileOutputStream(String filename)
Opens an OutputStream to a given file. |
InputStream |
spiOpenURLInputStream(String protocolAndFilename)
Opens an InputStream to a resource with a given URL. |
OutputStream |
spiOpenURLOutputStream(String protocolAndFilename)
Opens an OutputStream to a resource with a given URL. |
void |
spiPrintLine(Writer writer,
String msg)
Writes a carriage return into the stream. |
String |
spiReadLine(Reader reader)
Reads a line with a specified Reader. |
void |
spiWaitKey()
Dummy Waikey function with no effect, because userinput depends on the device used. |
Methods inherited from class iaik.me.utils.SysUtil |
getLineReader, getLineWriter, getSysUtil, loadLibrary, nextBytes, openFileInputStream, openFileOutputStream, openURLInputStream, openURLOutputStream, printLine, printLine, readLine, setSysUtil, setSysUtil, toString, waitKey |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public InputStream spiOpenFileInputStream(String filename) throws IOException
see the CLDC specification/documentation for further details.
For other protocols use openURLInputStream(String protocolAndFilename)
instead.
spiOpenFileInputStream
in class SysUtil
filename
- with path infoIOException
- public OutputStream spiOpenFileOutputStream(String filename) throws IOException
see the CLDC specification/documentation for further details.
For other protocols use spiOpenURLOutputStream(String protocolAndFilename)
instead.
spiOpenFileOutputStream
in class SysUtil
filename
- with path infoIOException
- public InputStream spiOpenURLInputStream(String protocolAndFilename) throws IOException
InputStream in = spiOpenURLInputStream("file:demo.txt");
or
InputStream in = spiOpenURLInputStream("http://www.server.com:80");
spiOpenURLInputStream
in class SysUtil
URL
- to resourceIOException
- public OutputStream spiOpenURLOutputStream(String protocolAndFilename) throws IOException
OutputStream in = spiOpenURLOutputStream("file:demo.txt");
spiOpenURLOutputStream
in class SysUtil
URL
- to resourceIOException
- public void spiNextBytes(Random random, byte[] data)
spiNextBytes
in class SysUtil
a
- random number generatora
- byte array to put the result intopublic boolean spiLoadLibrary(String libraryName) throws Throwable
The library is normaly searched for in the operatingsystems system directory. Check your operatingsystems documentation for further details. This function alway return false in the CLDC version of this library.
spiLoadLibrary
in class SysUtil
libraryname
- Throwable
- public Reader spiGetLineReader(Reader reader)
where the BufferedReader is not available, it returns the Reader unchanged. In case of the J2SE it returns a Buffered Reader
spiGetLineReader
in class SysUtil
Reader
- public String spiReadLine(Reader reader) throws IOException
spiReadLine
in class SysUtil
a
- specified readerIOException
- public Writer spiGetLineWriter(Writer writer)
spiGetLineWriter
in class SysUtil
a
- Reader objectpublic void spiPrintLine(Writer writer, String msg)
spiPrintLine
in class SysUtil
a
- Writer object with an open stream.public void spiWaitKey()
because userinput depends on the device used. There is only a text output.
spiWaitKey
in class SysUtil
|
This Javadoc may contain text parts from IETF Internet Standard specifications, see copyright note) and RSA Data Security Public-Key Cryptography Standards (see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |