← 返回首页
ByteArrayInputStream (Java SE 26 & JDK 26)
JavaScript is disabled on your browser.
Contents  
  1. Description
  2. Field Summary
  3. Constructor Summary
  4. Method Summary
    1. Methods declared in class InputStream
    2. Methods declared in class Object
  5. Field Details
    1. buf
    2. pos
    3. mark
    4. count
  6. Constructor Details
    1. ByteArrayInputStream(byte[])
    2. ByteArrayInputStream(byte[], int, int)
  7. Method Details
    1. read()
    2. read(byte[], int, int)
    3. readAllBytes()
    4. readNBytes(byte[], int, int)
    5. skip(long)
    6. available()
    7. markSupported()
    8. mark(int)
    9. reset()
    10. close()
Hide sidebar  Show sidebar

Class ByteArrayInputStream

java.lang.Object
java.io.InputStream
java.io.ByteArrayInputStream
All Implemented Interfaces: Closeable, AutoCloseable
public class ByteArrayInputStream extends InputStream
A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream. An internal counter keeps track of the next byte to be supplied by the read method.

Closing a ByteArrayInputStream has no effect. The methods in this class can be called after the stream has been closed without generating an IOException.

Since: 1.0 See Also:

Scripting on this page tracks web page traffic, but does not change the content in any way.