Package jp.gr.java_conf.dangan.io
Class DisconnectableInputStream
java.lang.Object
java.io.InputStream
jp.gr.java_conf.dangan.io.DisconnectableInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Disconnectable
?f?[?^???????????????X?g???[???? ?f?[?^??????????
?????X?g???[?????????}???????????????????[?e?B???e?B?N???X?B
java.io.BufferedInputStream ?????o?b?t?@?????O?????X?g???[?? ???????}???????????????? jp.gr.java_conf.dangan.io.LimitedInputStream ?????g?p???? ???}???????u????????o?b?t?@?????O???}?~?????K?v???????B
java.io.BufferedInputStream ?????o?b?t?@?????O?????X?g???[?? ???????}???????????????? jp.gr.java_conf.dangan.io.LimitedInputStream ?????g?p???? ???}???????u????????o?b?t?@?????O???}?~?????K?v???????B
-- revision history -- $Log: DisconnectableInputStream.java,v $ Revision 1.0 2002/07/24 00:00:00 dangan add to version control [maintenance] ?^?u?p?~ ???C?Z???X????C?? ?\?[?X????
- Version:
- $Revision: 1.0 $
- Author:
- $Author: dangan $
-
Constructor Summary
ConstructorsConstructorDescriptionin ???????}?????????\???????X?g???[?????\?z?????B -
Method Summary
Modifier and TypeMethodDescriptionint
???}???????????X?g???[???????u???b?N??????? ?????????}???????????o?C?g?????????Bvoid
close()
???}???????????X?g???[?????????}???????????B
?}?????\?b?h?? disconnect() ?????????????????Bvoid
???}???????????X?g???[?????????}???????????Bvoid
mark
(int readLimit) ???}???????????X?g???[???????????u???}?[?N?????????A reset() ???\?b?h???}?[?N???????_?? ???????????u?? ?????????????????Bboolean
???}???????????X?g???[???? mark() ?? reset() ?? ?T?|?[?g?????????????Bint
read()
???}???????????X?g???[?????? ????1?o?C?g???f?[?^???????Bint
read
(byte[] buffer) ???}???????????X?g???[?????? ?o?C?g?z?? buffer ?? ?????????????f?[?^???????????B
?f?[?^???K?????? buffer ????????????????????}?????????Bint
read
(byte[] buffer, int index, int length) ???}???????????X?g???[?????? ?o?C?g?z?? buffer ?? index ???w???????????u???? length ?o?C?g???f?[?^?? ?????????B
?f?[?^???K?????? length ?o?C?g???????????????????? ????}?????????Bvoid
reset()
???}???????????X?g???[???????????????u???????? mark() ???\?b?h???????o???????????????u???????????Blong
skip
(long length) ???}???????????X?g???[?????f?[?^?? length ?o?C?g ???????????BMethods inherited from class java.io.InputStream
markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
DisconnectableInputStream
in ???????}?????????\???????X?g???[?????\?z?????B- Parameters:
in
- ?????X?g???[??
-
-
Method Details
-
read
???}???????????X?g???[?????? ????1?o?C?g???f?[?^???????B- Specified by:
read
in classInputStream
- Returns:
- ????????????1?o?C?g???f?[?^?B
EndOfStream???B?????????? -1 ???????B - Throws:
IOException
- ???o???G???[?????????????
-
read
???}???????????X?g???[?????? ?o?C?g?z?? buffer ?? ?????????????f?[?^???????????B
?f?[?^???K?????? buffer ????????????????????}?????????B- Overrides:
read
in classInputStream
- Parameters:
buffer
- ?????????????f?[?^???i?[???????????o?C?g?z??- Returns:
- buffer ?????????????f?[?^?????o?C?g?????????B
???? EndOfStream ???B????????????? -1 ???????B - Throws:
IOException
- ???o???G???[?????????????
-
read
???}???????????X?g???[?????? ?o?C?g?z?? buffer ?? index ???w???????????u???? length ?o?C?g???f?[?^?? ?????????B
?f?[?^???K?????? length ?o?C?g???????????????????? ????}?????????B- Overrides:
read
in classInputStream
- Parameters:
buffer
- ?????????????f?[?^???i?[???????????o?C?g?z??index
- buffer?????f?[?^?????????J?n???ulength
- buffer???????????f?[?^??- Returns:
- buffer ?????????????f?[?^?????o?C?g?????????B
???? EndOfStream ???B????????????? -1 ???????B - Throws:
IOException
- ???o???G???[?????????????
-
skip
???}???????????X?g???[?????f?[?^?? length ?o?C?g ???????????B- Overrides:
skip
in classInputStream
- Parameters:
length
- ???????????o?C?g???B- Returns:
- ?????????????????????o?C?g???B
- Throws:
IOException
- ???o???G???[?????????????
-
mark
public void mark(int readLimit) ???}???????????X?g???[???????????u???}?[?N?????????A reset() ???\?b?h???}?[?N???????_?? ???????????u?? ?????????????????B- Overrides:
mark
in classInputStream
- Parameters:
readLimit
- ?}?[?N???u???????????E???o?C?g???B ?}???o?C?g?????L?????f?[?^?????? ?????????? reset()?????????????? ?\?????????B
-
reset
???}???????????X?g???[???????????????u???????? mark() ???\?b?h???????o???????????????u???????????B- Overrides:
reset
in classInputStream
- Throws:
IOException
- ???o???G???[?????????????
-
markSupprted
public boolean markSupprted()???}???????????X?g???[???? mark() ?? reset() ?? ?T?|?[?g?????????????B- Returns:
- ?X?g???[???? mark() ?? reset() ??
?T?|?[?g?????????? true?B
?T?|?[?g??????????? false?B
-
available
???}???????????X?g???[???????u???b?N??????? ?????????}???????????o?C?g?????????B- Overrides:
available
in classInputStream
- Returns:
- ?u???b?N????????????o?????o?C?g???B
- Throws:
IOException
- ???o???G???[?????????????
-
close
public void close()???}???????????X?g???[?????????}???????????B
?}?????\?b?h?? disconnect() ?????????????????B- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-
disconnect
public void disconnect()???}???????????X?g???[?????????}???????????B- Specified by:
disconnect
in interfaceDisconnectable
-