IT. Expert System.

Android Reference

LimitedLengthInputStream


android.content.pm

Class LimitedLengthInputStream

  • All Implemented Interfaces:
    Closeable, AutoCloseable


    public class LimitedLengthInputStream
    extends FilterInputStream
    A class that limits the amount of data that is read from an InputStream. When the specified length is reached, the stream returns an EOF even if the underlying stream still has more data.
    • Constructor Detail

      • LimitedLengthInputStream

        public LimitedLengthInputStream(InputStream in,
                                long offset,
                                long length)
                                 throws IOException
        Parameters:
        in - underlying stream to wrap
        offset - offset into stream where data starts
        length - length of data at offset
        Throws:
        IOException - if an error occurred with the underlying stream
    • Method Detail

      • read

        public int read()
                 throws IOException
        Description copied from class: FilterInputStream
        Reads a single byte from the filtered stream and returns it as an integer in the range from 0 to 255. Returns -1 if the end of this stream has been reached.
        Overrides:
        read in class FilterInputStream
        Returns:
        the byte read or -1 if the end of the filtered stream has been reached.
        Throws:
        IOException - if the stream is closed or another IOException occurs.
      • read

        public int read(byte[] buffer,
               int offset,
               int byteCount)
                 throws IOException
        Description copied from class: FilterInputStream
        Reads at most count bytes from this stream and stores them in the byte array buffer starting at offset. Returns the number of bytes actually read or -1 if no bytes have been read and the end of this stream has been reached. This implementation reads bytes from the filtered stream.
        Overrides:
        read in class FilterInputStream
        Parameters:
        buffer - the byte array in which to store the bytes read.
        offset - the initial position in buffer to store the bytes read from this stream.
        byteCount - the maximum number of bytes to store in buffer.
        Returns:
        the number of bytes actually read or -1 if the end of the filtered stream has been reached while reading.
        Throws:
        IOException - if this stream is closed or another I/O error occurs.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 163 / 158679174. Delta: 0.04306 с