org.microemu.app.util
Class MIDletResourceInputStream

java.lang.Object
  extended by java.io.InputStream
      extended by org.microemu.app.util.MIDletResourceInputStream
All Implemented Interfaces:
java.io.Closeable

public class MIDletResourceInputStream
extends java.io.InputStream

Special InputStream wrapper for loading resources is needed to change behavior of read(byte[] b) under Java SE. All existing Java ME implementations always read all bytes available in one read call.


Constructor Summary
MIDletResourceInputStream(java.io.InputStream is)
           
 
Method Summary
 int available()
           
 int read()
           
 int read(byte[] b)
           
 
Methods inherited from class java.io.InputStream
close, mark, markSupported, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MIDletResourceInputStream

public MIDletResourceInputStream(java.io.InputStream is)
Method Detail

available

public int available()
              throws java.io.IOException
Overrides:
available in class java.io.InputStream
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Specified by:
read in class java.io.InputStream
Throws:
java.io.IOException

read

public int read(byte[] b)
         throws java.io.IOException
Overrides:
read in class java.io.InputStream
Throws:
java.io.IOException


Copyright © 2001-2009 MicroEmulator Team. All Rights Reserved.