mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6595142: (spec) ByteArrayInputStream treats bytes, not characters
Reviewed-by: alanb
This commit is contained in:
parent
880f52fda0
commit
57798dd439
3 changed files with 7 additions and 7 deletions
|
@ -96,7 +96,7 @@ public class BufferedInputStream extends FilterInputStream {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The current position in the buffer. This is the index of the next
|
* The current position in the buffer. This is the index of the next
|
||||||
* character to be read from the {@code buf} array.
|
* byte to be read from the {@code buf} array.
|
||||||
* <p>
|
* <p>
|
||||||
* This value is always in the range {@code 0}
|
* This value is always in the range {@code 0}
|
||||||
* through {@code count}. If it is less
|
* through {@code count}. If it is less
|
||||||
|
@ -297,7 +297,7 @@ public class BufferedInputStream extends FilterInputStream {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Read characters into a portion of an array, reading from the underlying
|
* Read bytes into a portion of an array, reading from the underlying
|
||||||
* stream at most once if necessary.
|
* stream at most once if necessary.
|
||||||
*/
|
*/
|
||||||
private int read1(byte[] b, int off, int len) throws IOException {
|
private int read1(byte[] b, int off, int len) throws IOException {
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class ByteArrayInputStream extends InputStream {
|
||||||
protected byte[] buf;
|
protected byte[] buf;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The index of the next character to read from the input stream buffer.
|
* The index of the next byte to read from the input stream buffer.
|
||||||
* This value should always be nonnegative
|
* This value should always be nonnegative
|
||||||
* and not larger than the value of {@code count}.
|
* and not larger than the value of {@code count}.
|
||||||
* The next byte to be read from the input stream buffer
|
* The next byte to be read from the input stream buffer
|
||||||
|
@ -80,7 +80,7 @@ public class ByteArrayInputStream extends InputStream {
|
||||||
protected int mark = 0;
|
protected int mark = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The index one greater than the last valid character in the input
|
* The index one greater than the last valid byte in the input
|
||||||
* stream buffer.
|
* stream buffer.
|
||||||
* This value should always be nonnegative
|
* This value should always be nonnegative
|
||||||
* and not larger than the length of {@code buf}.
|
* and not larger than the length of {@code buf}.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1994, 2022, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1994, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -134,7 +134,7 @@ public class SequenceInputStream extends InputStream {
|
||||||
* {@inheritDoc}
|
* {@inheritDoc}
|
||||||
* <p>
|
* <p>
|
||||||
* This method
|
* This method
|
||||||
* tries to read one character from the current substream. If it
|
* tries to read one byte from the current substream. If it
|
||||||
* reaches the end of the stream, it calls the {@code close}
|
* reaches the end of the stream, it calls the {@code close}
|
||||||
* method of the current substream and begins reading from the next
|
* method of the current substream and begins reading from the next
|
||||||
* substream.
|
* substream.
|
||||||
|
@ -163,7 +163,7 @@ public class SequenceInputStream extends InputStream {
|
||||||
* <p>
|
* <p>
|
||||||
* The {@code read} method of {@code SequenceInputStream}
|
* The {@code read} method of {@code SequenceInputStream}
|
||||||
* tries to read the data from the current substream. If it fails to
|
* tries to read the data from the current substream. If it fails to
|
||||||
* read any characters because the substream has reached the end of
|
* read any bytes because the substream has reached the end of
|
||||||
* the stream, it calls the {@code close} method of the current
|
* the stream, it calls the {@code close} method of the current
|
||||||
* substream and begins reading from the next substream.
|
* substream and begins reading from the next substream.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue