|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
dk.rode.thesis.templatemethod.ZipSequence.ReadOnlyInputStream
class ZipSequence.ReadOnlyInputStream
A read-only input stream is a protection proxy (decorator) that ensures that a given input stream cannot be closed or reset by an external context.
Implementation notes:
This is an application of the Proxy pattern.
| Constructor Summary | |
|---|---|
ZipSequence.ReadOnlyInputStream()
No-arg constructor. |
|
| Method Summary | |
|---|---|
int |
available()
|
void |
close()
All calls are ignored. |
(package private) ZipSequence |
getSequence()
Return the zip sequence this stream is associated with. |
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
reset()
All calls are ignored. |
long |
skip(long n)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
ZipSequence.ReadOnlyInputStream()
| Method Detail |
|---|
public int available()
throws IOException
available in class InputStreamIOExceptionpublic void close()
close in interface Closeableclose in class InputStreamZipSequence getSequence()
public void mark(int readlimit)
mark in class InputStreampublic boolean markSupported()
markSupported in class InputStream
public int read()
throws IOException
read in class InputStreamIOException
public int read(byte[] b)
throws IOException
read in class InputStreamIOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic void reset()
reset in class InputStream
public long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic String toString()
toString in class Object
|
Gunni Rode / rode.dk | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||