Package org.conscrypt

Interface DataStream

All Known Implementing Classes:
HandshakeIODataStream, SSLEngineDataStream

public interface DataStream
This interface represents the ability of the classes to provide the chunks of data.
  • Method Summary

    Modifier and Type Method Description
    byte[] getData​(int length)
    Retrieves the data of specified length from the stream.
    boolean hasData()
    Checks if there is data to be read.
  • Method Details

    • hasData

      boolean hasData()
      Checks if there is data to be read.
      Returns:
      true if there is the input data in the stream, false otherwise
    • getData

      byte[] getData​(int length)
      Retrieves the data of specified length from the stream. If the data size in the stream is less than specified length, method returns all the data contained in the stream.
      Returns:
      byte array containing the demanded data.