MCPcopy Create free account
hub / github.com/davidgiven/luje / write

Method write

lib/java/io/ByteArrayOutputStream.java:197–212  ·  view source on GitHub ↗

Writes count bytes from the byte array buffer starting at offset index to this stream. @param buffer the buffer to be written. @param offset the initial position in buffer to retrieve bytes. @param len the number of bytes of {@code bu

(byte[] buffer, int offset, int len)

Source from the content-addressed store, hash-verified

195 * {@code buffer}.
196 */
197 @Override
198 public synchronized void write(byte[] buffer, int offset, int len) {
199 // avoid int overflow
200 if (offset < 0 || offset > buffer.length || len < 0
201 || len > buffer.length - offset) {
202 throw new IndexOutOfBoundsException(Messages.getString("luni.13")); //$NON-NLS-1$
203 }
204 if (len == 0) {
205 return;
206 }
207
208 /* Expand if necessary */
209 expand(len);
210 System.arraycopy(buffer, offset, buf, this.count, len);
211 this.count += len;
212 }
213
214 /**
215 * Writes the specified byte {@code oneByte} to the OutputStream. Only the

Callers 2

decodeMethod · 0.95
decodeMethod · 0.95

Calls 3

getStringMethod · 0.95
expandMethod · 0.95
arraycopyMethod · 0.95

Tested by

no test coverage detected