/external/apache-commons-io/src/test/java/org/apache/commons/io/input/ |
D | RandomAccessFileInputStreamTest.java | 45 …try (RandomAccessFileInputStream inputStream = new RandomAccessFileInputStream(createRandomAccessF… in testAvailable() argument 47 assertEquals(DATA_FILE_LEN, inputStream.available()); in testAvailable() 53 …try (RandomAccessFileInputStream inputStream = new RandomAccessFileInputStream(createRandomAccessF… in testAvailableLong() argument 55 assertEquals(DATA_FILE_LEN, inputStream.availableLong()); in testAvailableLong() 62 … try (RandomAccessFileInputStream inputStream = new RandomAccessFileInputStream(file, false)) { in testConstructorCloseOnCloseFalse() argument 63 assertFalse(inputStream.isCloseOnClose()); in testConstructorCloseOnCloseFalse() 72 … try (RandomAccessFileInputStream inputStream = new RandomAccessFileInputStream(file, true)) { in testConstructorCloseOnCloseTrue() argument 73 assertTrue(inputStream.isCloseOnClose()); in testConstructorCloseOnCloseTrue() 82 try (RandomAccessFileInputStream inputStream = new RandomAccessFileInputStream(file)) { in testConstructorFile() argument 83 assertFalse(inputStream.isCloseOnClose()); in testConstructorFile() [all …]
|
D | MemoryMappedFileInputStreamTest.java | 72 try (InputStream inputStream = new MemoryMappedFileInputStream(file, 1024)) { in testAlternateBufferSize() argument 74 assertArrayEquals(expectedData, IOUtils.toByteArray(inputStream)); in testAlternateBufferSize() 83 try (InputStream inputStream = new MemoryMappedFileInputStream(file)) { in testEmptyFile() argument 85 assertArrayEquals(EMPTY_BYTE_ARRAY, IOUtils.toByteArray(inputStream)); in testEmptyFile() 96 try (InputStream inputStream = new MemoryMappedFileInputStream(file)) { in testLargerFile() argument 98 assertArrayEquals(expectedData, IOUtils.toByteArray(inputStream)); in testLargerFile() 108 try (InputStream inputStream = new MemoryMappedFileInputStream(file, 1024)) { in testReadAfterClose() argument 109 inputStream.close(); in testReadAfterClose() 111 Assertions.assertThrows(IOException.class, () -> IOUtils.toByteArray(inputStream)); in testReadAfterClose() 121 try (InputStream inputStream = new MemoryMappedFileInputStream(file, 1024)) { in testReadSingleByte() argument [all …]
|
D | AbstractInputStreamTest.java | 63 for (final InputStream inputStream : inputStreams) { in testBytesSkipped() 64 assertEquals(1024, inputStream.skip(1024)); in testBytesSkipped() 66 assertEquals(randomBytes[i], (byte) inputStream.read()); in testBytesSkipped() 73 for (final InputStream inputStream : inputStreams) { in testBytesSkippedAfterEOF() 74 assertEquals(randomBytes.length, inputStream.skip(randomBytes.length + 1)); in testBytesSkippedAfterEOF() 75 assertEquals(-1, inputStream.read()); in testBytesSkippedAfterEOF() 81 for (final InputStream inputStream : inputStreams) { in testBytesSkippedAfterRead() 83 assertEquals(randomBytes[i], (byte) inputStream.read()); in testBytesSkippedAfterRead() 85 assertEquals(1024, inputStream.skip(1024)); in testBytesSkippedAfterRead() 87 assertEquals(randomBytes[i], (byte) inputStream.read()); in testBytesSkippedAfterRead() [all …]
|
D | AutoCloseInputStreamTest.java | 111 …final AutoCloseInputStream inputStream = new AutoCloseInputStream(new ByteArrayInputStream(inputSt… in testResetBeforeEnd() local 112 inputStream.mark(1); in testResetBeforeEnd() 113 assertEquals('1', inputStream.read()); in testResetBeforeEnd() 114 inputStream.reset(); in testResetBeforeEnd() 115 assertEquals('1', inputStream.read()); in testResetBeforeEnd() 116 assertEquals('2', inputStream.read()); in testResetBeforeEnd() 117 inputStream.reset(); in testResetBeforeEnd() 118 assertEquals('1', inputStream.read()); in testResetBeforeEnd() 119 assertEquals('2', inputStream.read()); in testResetBeforeEnd() 120 assertEquals('3', inputStream.read()); in testResetBeforeEnd() [all …]
|
/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime.Tests/ |
D | ANTLRxxxxStreamFixture.cs | 78 ANTLRInputStream inputStream = new ANTLRInputStream(grammarStream, Encoding.Unicode); in TestSizeOnEmptyANTLRInputStream() 79 Assert.AreEqual(0, inputStream.Count); in TestSizeOnEmptyANTLRInputStream() 89 ANTLRInputStream inputStream = new ANTLRInputStream(grammarStream, Encoding.Unicode); in TestSizeOnANTLRInputStream() 90 Assert.AreEqual(grammarStr.Length, inputStream.Count); in TestSizeOnANTLRInputStream() 100 ANTLRInputStream inputStream = new ANTLRInputStream(grammarStream, Encoding.Unicode); in TestConsumeAndIndexOnANTLRInputStream() 101 Assert.AreEqual(0, inputStream.Index); in TestConsumeAndIndexOnANTLRInputStream() 103 inputStream.Consume(); in TestConsumeAndIndexOnANTLRInputStream() 104 Assert.AreEqual(1, inputStream.Index); in TestConsumeAndIndexOnANTLRInputStream() 106 inputStream.Consume(); in TestConsumeAndIndexOnANTLRInputStream() 107 Assert.AreEqual(2, inputStream.Index); in TestConsumeAndIndexOnANTLRInputStream() [all …]
|
/external/cbor-java/src/test/java/co/nstant/in/cbor/decoder/ |
D | AbstractDecoderTest.java | 19 public TestableAbstractDecoder(InputStream inputStream) { in TestableAbstractDecoder() argument 20 super(null, inputStream); in TestableAbstractDecoder() 44 InputStream inputStream = new ByteArrayInputStream(new byte[] {}); in shouldThrowExceptionOnUnexpectedEndOfStream() local 45 new TestableAbstractDecoder(inputStream).callNextSymbol(); in shouldThrowExceptionOnUnexpectedEndOfStream() 51 InputStream inputStream = new ByteArrayInputStream(new byte[] {}); in shouldDecodeInfinityLength() local 52 TestableAbstractDecoder decoder = new TestableAbstractDecoder(inputStream); in shouldDecodeInfinityLength() 58 InputStream inputStream = new ByteArrayInputStream(new byte[] {}); in shouldThrowExceptionOnReserved1() local 59 new TestableAbstractDecoder(inputStream).callGetLengthAsBigInteger(28); in shouldThrowExceptionOnReserved1() 65 InputStream inputStream = new ByteArrayInputStream(new byte[] {}); in shouldThrowExceptionOnReserved2() local 66 new TestableAbstractDecoder(inputStream).callGetLengthAsBigInteger(29); in shouldThrowExceptionOnReserved2() [all …]
|
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ |
D | DataSourceInputStreamTest.java | 37 DataSourceInputStream inputStream = buildTestInputStream(); in readSingleBytes() local 39 assertThat(inputStream.bytesRead()).isEqualTo(0); in readSingleBytes() 42 int readByte = inputStream.read(); in readSingleBytes() 46 assertThat(inputStream.bytesRead()).isEqualTo(i + 1); in readSingleBytes() 49 assertThat(inputStream.read()).isEqualTo(-1); in readSingleBytes() 50 assertThat(inputStream.bytesRead()).isEqualTo(TEST_DATA.length); in readSingleBytes() 52 inputStream.close(); in readSingleBytes() 57 DataSourceInputStream inputStream = buildTestInputStream(); 63 inputStream.read(readBytes, totalBytesRead, TEST_DATA.length - totalBytesRead); 66 assertThat(inputStream.bytesRead()).isEqualTo(totalBytesRead); [all …]
|
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/datasource/src/test/java/com/google/android/exoplayer2/upstream/ |
D | DataSourceInputStreamTest.java | 37 DataSourceInputStream inputStream = buildTestInputStream(); in readSingleBytes() local 39 assertThat(inputStream.bytesRead()).isEqualTo(0); in readSingleBytes() 42 int readByte = inputStream.read(); in readSingleBytes() 46 assertThat(inputStream.bytesRead()).isEqualTo(i + 1); in readSingleBytes() 49 assertThat(inputStream.read()).isEqualTo(-1); in readSingleBytes() 50 assertThat(inputStream.bytesRead()).isEqualTo(TEST_DATA.length); in readSingleBytes() 52 inputStream.close(); in readSingleBytes() 57 DataSourceInputStream inputStream = buildTestInputStream(); 63 inputStream.read(readBytes, totalBytesRead, TEST_DATA.length - totalBytesRead); 66 assertThat(inputStream.bytesRead()).isEqualTo(totalBytesRead); [all …]
|
/external/apache-velocity-engine/velocity-engine-core/src/main/java/org/apache/velocity/io/ |
D | UnicodeInputStream.java | 84 private final PushbackInputStream inputStream; field in UnicodeInputStream 93 public UnicodeInputStream(final InputStream inputStream) in UnicodeInputStream() argument 96 this(inputStream, true); in UnicodeInputStream() 107 public UnicodeInputStream(final InputStream inputStream, boolean skipBOM) in UnicodeInputStream() argument 113 this.inputStream = new PushbackInputStream(inputStream, MAX_BOM_SIZE); in UnicodeInputStream() 230 int res = inputStream.read(); in readByte() 265 inputStream.unread(buf, start, count); in pushback() 276 inputStream.close(); in close() 287 return inputStream.available(); in available() 297 inputStream.mark(readlimit); in mark() [all …]
|
/external/exoplayer/tree_8e57d3715f9092d5ec54ebe2e538f34bfcc34479/library/hls/src/test/java/com/google/android/exoplayer2/source/hls/playlist/ |
D | HlsMediaPlaylistParserTest.java | 85 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseMediaPlaylist() local 86 HlsPlaylist playlist = new HlsPlaylistParser().parse(playlistUri, inputStream); in parseMediaPlaylist() 184 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseMediaPlaylist_withByteRanges() local 185 HlsPlaylist playlist = new HlsPlaylistParser().parse(playlistUri, inputStream); in parseMediaPlaylist_withByteRanges() 226 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseSampleAesMethod() local 228 (HlsMediaPlaylist) new HlsPlaylistParser().parse(playlistUri, inputStream); in parseSampleAesMethod() 255 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseSampleAesCencMethod() local 257 (HlsMediaPlaylist) new HlsPlaylistParser().parse(playlistUri, inputStream); in parseSampleAesCencMethod() 279 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseSampleAesCtrMethod() local 282 (HlsMediaPlaylist) new HlsPlaylistParser().parse(playlistUri, inputStream); in parseSampleAesCtrMethod() [all …]
|
/external/exoplayer/tree_15dc86382f17a24a3e881e52e31a810c1ea44b49/library/hls/src/test/java/com/google/android/exoplayer2/source/hls/playlist/ |
D | HlsMediaPlaylistParserTest.java | 85 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseMediaPlaylist() local 86 HlsPlaylist playlist = new HlsPlaylistParser().parse(playlistUri, inputStream); in parseMediaPlaylist() 184 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseMediaPlaylist_withByteRanges() local 185 HlsPlaylist playlist = new HlsPlaylistParser().parse(playlistUri, inputStream); in parseMediaPlaylist_withByteRanges() 226 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseSampleAesMethod() local 228 (HlsMediaPlaylist) new HlsPlaylistParser().parse(playlistUri, inputStream); in parseSampleAesMethod() 255 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseSampleAesCencMethod() local 257 (HlsMediaPlaylist) new HlsPlaylistParser().parse(playlistUri, inputStream); in parseSampleAesCencMethod() 279 InputStream inputStream = new ByteArrayInputStream(Util.getUtf8Bytes(playlistString)); in parseSampleAesCtrMethod() local 282 (HlsMediaPlaylist) new HlsPlaylistParser().parse(playlistUri, inputStream); in parseSampleAesCtrMethod() [all …]
|
/external/grpc-grpc-java/core/src/test/java/io/grpc/internal/ |
D | ReadableBuffersTest.java | 90 InputStream inputStream = ReadableBuffers.openStream(buffer, true); in bufferInputStream_available_returnsReadableBytes() local 91 assertEquals(5, inputStream.available()); in bufferInputStream_available_returnsReadableBytes() 92 while (inputStream.available() != 0) { in bufferInputStream_available_returnsReadableBytes() 93 inputStream.read(); in bufferInputStream_available_returnsReadableBytes() 95 assertEquals(-1, inputStream.read()); in bufferInputStream_available_returnsReadableBytes() 101 InputStream inputStream = ReadableBuffers.openStream(buffer, true); in bufferInputStream_read_returnsUnsignedByte() local 102 assertEquals((int) 'h', inputStream.read()); in bufferInputStream_read_returnsUnsignedByte() 108 InputStream inputStream = ReadableBuffers.openStream(buffer, true); in bufferInputStream_read_writes() local 110 assertEquals(5, inputStream.read(dest, /*destOffset*/ 0, /*length*/ 5)); in bufferInputStream_read_writes() 112 assertEquals(-1, inputStream.read(/*dest*/ new byte[1], /*destOffset*/ 0, /*length*/1)); in bufferInputStream_read_writes() [all …]
|
/external/robolectric/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowBitmapFactoryTest.java | 115 InputStream inputStream = in decodeStream_shouldSetDescriptionAndCreatedFrom() local 117 Bitmap bitmap = BitmapFactory.decodeStream(inputStream); in decodeStream_shouldSetDescriptionAndCreatedFrom() 120 assertEquals(inputStream, shadowBitmap.getCreatedFromStream()); in decodeStream_shouldSetDescriptionAndCreatedFrom() 158 InputStream inputStream = in decodeStream_shouldSetDescriptionWithNullOptions() local 160 Bitmap bitmap = BitmapFactory.decodeStream(inputStream, null, null); in decodeStream_shouldSetDescriptionWithNullOptions() 189 InputStream inputStream = in decodeResourceStream_canTakeOptions() local 194 context.getResources(), null, inputStream, null, options); in decodeResourceStream_canTakeOptions() 293 InputStream inputStream = in decodeStream_shouldGetWidthAndHeightFromHints() local 295 Bitmap bitmap = BitmapFactory.decodeStream(inputStream); in decodeStream_shouldGetWidthAndHeightFromHints() 303 InputStream inputStream = in decodeStream_shouldGetWidthAndHeightFromActualImage() local [all …]
|
/external/mp4parser/isoparser/src/main/java/com/googlecode/mp4parser/authoring/tracks/ |
D | AACTrackImpl.java | 76 private BufferedInputStream inputStream; field in AACTrackImpl 83 public AACTrackImpl(InputStream inputStream, String lang) throws IOException { in AACTrackImpl() argument 85 parse(inputStream); in AACTrackImpl() 88 public AACTrackImpl(InputStream inputStream) throws IOException { in AACTrackImpl() argument 89 parse(inputStream); in AACTrackImpl() 92 private void parse(InputStream inputStream) throws IOException { in parse() argument 93 this.inputStream = new BufferedInputStream(inputStream); in parse() 217 inputStream.mark(100); in readVariables() 218 if (100 != inputStream.read(data, 0, 100)) { in readVariables() 221 inputStream.reset(); // Rewind in readVariables() [all …]
|
/external/lottie/lottie/src/main/java/com/airbnb/lottie/network/ |
D | NetworkFetcher.java | 59 InputStream inputStream = cacheResult.second; in fetchFromCache() local 62 result = LottieCompositionFactory.fromZipStreamSync(new ZipInputStream(inputStream), url); in fetchFromCache() 64 result = LottieCompositionFactory.fromJsonInputStreamSync(inputStream, url); in fetchFromCache() 81 InputStream inputStream = fetchResult.bodyByteStream(); in fetchFromNetwork() local 83 … LottieResult<LottieComposition> result = fromInputStream(url, inputStream, contentType, cacheKey); in fetchFromNetwork() 103 …Composition> fromInputStream(@NonNull String url, @NonNull InputStream inputStream, @Nullable Stri… in fromInputStream() argument 118 result = fromZipStream(url, inputStream, cacheKey); in fromInputStream() 122 result = fromJsonStream(url, inputStream, cacheKey); in fromInputStream() 133 …ieComposition> fromZipStream(@NonNull String url, @NonNull InputStream inputStream, @Nullable Stri… in fromZipStream() argument 136 return LottieCompositionFactory.fromZipStreamSync(new ZipInputStream(inputStream), null); in fromZipStream() [all …]
|
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/issues/issue99/ |
D | YamlBase64Test.java | 61 InputStream inputStream = YamlBase64Test.class in testYamlBase64Loading() local 63 Map<String, Object> bean = (Map<String, Object>) yaml.load(inputStream); in testYamlBase64Loading() 66 inputStream.close(); in testYamlBase64Loading() 93 InputStream inputStream = YamlBase64Test.class in testYamlBase64LoadingLiteral() local 96 yaml.load(inputStream); in testYamlBase64LoadingLiteral() 102 inputStream.close(); in testYamlBase64LoadingLiteral() 113 InputStream inputStream = YamlBase64Test.class in testRedefineBinaryTag() local 115 Map<String, Object> bean = (Map<String, Object>) yaml.load(inputStream); in testRedefineBinaryTag() 118 inputStream.close(); in testRedefineBinaryTag() 143 InputStream inputStream = YamlBase64Test.class in testLocalBinaryTag() local [all …]
|
/external/smali/dexlib2/src/main/java/org/jf/dexlib2/util/ |
D | DexUtil.java | 58 public static int verifyDexHeader(@Nonnull InputStream inputStream) throws IOException { in verifyDexHeader() argument 59 if (!inputStream.markSupported()) { in verifyDexHeader() 62 inputStream.mark(44); in verifyDexHeader() 65 ByteStreams.readFully(inputStream, partialHeader); in verifyDexHeader() 69 inputStream.reset(); in verifyDexHeader() 120 public static void verifyOdexHeader(@Nonnull InputStream inputStream) throws IOException { in verifyOdexHeader() argument 121 if (!inputStream.markSupported()) { in verifyOdexHeader() 124 inputStream.mark(8); in verifyOdexHeader() 127 ByteStreams.readFully(inputStream, partialHeader); in verifyOdexHeader() 131 inputStream.reset(); in verifyOdexHeader()
|
/external/mockftpserver/tags/1.2.3/src/test/java/org/mockftpserver/core/socket/ |
D | StubSocket.java | 36 private InputStream inputStream; field in StubSocket 44 public StubSocket(InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 45 this(null, inputStream, outputStream); in StubSocket() 54 public StubSocket(InetAddress inetAddress, InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 56 this.inputStream = inputStream; in StubSocket() 83 return inputStream; in getInputStream()
|
/external/mockftpserver/tags/2.0.2/src/test/java/org/mockftpserver/core/socket/ |
D | StubSocket.java | 36 private InputStream inputStream; field in StubSocket 44 public StubSocket(InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 45 this(null, inputStream, outputStream); in StubSocket() 54 public StubSocket(InetAddress inetAddress, InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 56 this.inputStream = inputStream; in StubSocket() 83 return inputStream; in getInputStream()
|
/external/mockftpserver/tags/2.0.1/src/test/java/org/mockftpserver/core/socket/ |
D | StubSocket.java | 36 private InputStream inputStream; field in StubSocket 44 public StubSocket(InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 45 this(null, inputStream, outputStream); in StubSocket() 54 public StubSocket(InetAddress inetAddress, InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 56 this.inputStream = inputStream; in StubSocket() 83 return inputStream; in getInputStream()
|
/external/mockftpserver/tags/1.2.4/src/test/java/org/mockftpserver/core/socket/ |
D | StubSocket.java | 36 private InputStream inputStream; field in StubSocket 44 public StubSocket(InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 45 this(null, inputStream, outputStream); in StubSocket() 54 public StubSocket(InetAddress inetAddress, InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 56 this.inputStream = inputStream; in StubSocket() 83 return inputStream; in getInputStream()
|
/external/mockftpserver/tags/2.4/src/test/java/org/mockftpserver/core/socket/ |
D | StubSocket.java | 36 private InputStream inputStream; field in StubSocket 44 public StubSocket(InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 45 this(null, inputStream, outputStream); in StubSocket() 54 public StubSocket(InetAddress inetAddress, InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 56 this.inputStream = inputStream; in StubSocket() 83 return inputStream; in getInputStream()
|
/external/mockftpserver/tags/2.0/src/test/java/org/mockftpserver/core/socket/ |
D | StubSocket.java | 36 private InputStream inputStream; field in StubSocket 44 public StubSocket(InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 45 this(null, inputStream, outputStream); in StubSocket() 54 public StubSocket(InetAddress inetAddress, InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 56 this.inputStream = inputStream; in StubSocket() 83 return inputStream; in getInputStream()
|
/external/mockftpserver/tags/1.2.2/src/test/java/org/mockftpserver/core/socket/ |
D | StubSocket.java | 36 private InputStream inputStream; field in StubSocket 44 public StubSocket(InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 45 this(null, inputStream, outputStream); in StubSocket() 54 public StubSocket(InetAddress inetAddress, InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 56 this.inputStream = inputStream; in StubSocket() 83 return inputStream; in getInputStream()
|
/external/mockftpserver/tags/2.0-rc3/MockFtpServer/src/test/java/org/mockftpserver/core/socket/ |
D | StubSocket.java | 36 private InputStream inputStream; field in StubSocket 44 public StubSocket(InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 45 this(null, inputStream, outputStream); in StubSocket() 54 public StubSocket(InetAddress inetAddress, InputStream inputStream, OutputStream outputStream) { in StubSocket() argument 56 this.inputStream = inputStream; in StubSocket() 83 return inputStream; in getInputStream()
|