|
SunSPOT API V2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
com.sun.spot.peripheral.FlashInputStream
public class FlashInputStream
An InputStream that streams over flash memory.
| Constructor Summary | |
|---|---|
FlashInputStream(IFlashMemoryDevice device,
int startSectorNum,
int numOfSectors)
Create an InputStream that streams over specified sectors of a flash device |
|
| Method Summary | |
|---|---|
int |
available()
Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. |
void |
close()
Closes this input stream and releases any system resources associated with the stream. |
int |
read()
Reads the next byte of data from the input stream. |
| Methods inherited from class java.io.InputStream |
|---|
mark, markSupported, read, read, reset, skip |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FlashInputStream(IFlashMemoryDevice device,
int startSectorNum,
int numOfSectors)
InputStream that streams over specified sectors of a flash device
device - The memory devicestartSectorNum - The first sector to use (zero based)numOfSectors - The number of sectors to use| Method Detail |
|---|
public int read()
InputStreamint in the range 0 to
255. If no byte is available because the end of the stream
has been reached, the value -1 is returned. This method
blocks until input data is available, the end of the stream is detected,
or an exception is thrown.
A subclass must provide an implementation of this method.
read in class InputStream-1 if the end of the
stream is reached.public void close()
InputStream The close method of InputStream does
nothing.
close in class InputStreampublic int available()
InputStream The available method for class InputStream
always returns 0.
This method should be overridden by subclasses.
available in class InputStream
|
SunSPOT API V2.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||