Searched refs:write (Results 51 - 75 of 384) sorted by relevance

1234567891011>>

/libcore/ojluni/src/main/java/java/io/
H A DRandomAccessFile.java19 * 2 along with this work; if not, write to the Free Software Foundation,
46 * created in read/write mode, then output operations are also available;
47 * output operations write bytes starting at the file pointer and advance
48 * the file pointer past the bytes written. Output operations that write
86 * A single tracker to track both read and write. The tracker resets when the operation
93 * to write to, a file with the specified name. A new
109 * as its argument to see if write access to the file is allowed.
126 * {@code checkWrite} method denies write access to the file
141 * write to, the file specified by the {@link File} argument. A new {@link
151 * <td> Open for reading only. Invoking any of the <tt>write</t
476 public void write(int b) throws IOException { method in class:RandomAccessFile
504 public void write(byte b[]) throws IOException { method in class:RandomAccessFile
517 public void write(byte b[], int off, int len) throws IOException { method in class:RandomAccessFile
[all...]
H A DCharArrayWriter.java18 * 2 along with this work; if not, write to the Free Software Foundation,
78 public void write(int c) { method in class:CharArrayWriter
95 public void write(char c[], int off, int len) { method in class:CharArrayWriter
118 public void write(String str, int off, int len) { method in class:CharArrayWriter
132 * @param out the output stream to write to
137 out.write(buf, 0, count);
148 * out.write(csq.toString()) </pre>
167 write(s, 0, s.length());
179 * out.write(csq.subSequence(start, end).toString()) </pre>
205 write(
[all...]
H A DPrintStream.java19 * 2 along with this work; if not, write to the Free Software Foundation,
201 * SecurityManager#checkWrite checkWrite(fileName)} denies write
235 * SecurityManager#checkWrite checkWrite(fileName)} denies write
273 * denies write access to the file
307 * denies write access to the file
429 * #checkError()} to return <tt>false</tt> until another write
440 * which also implement the write() methods of OutputStream
448 * <p> Note that the byte is written as given; to write a character that
457 public void write(int b) { method in class:PrintStream
461 out.write(
488 public void write(byte buf[], int off, int len) { method in class:PrintStream
511 private void write(char buf[]) { method in class:PrintStream
535 private void write(String s) { method in class:PrintStream
[all...]
H A DBufferedWriter.java18 * 2 along with this work; if not, write to the Free Software Foundation,
44 * to wrap a BufferedWriter around any Writer whose write() operations may be
129 out.write(cb, 0, nextChar);
139 public void write(int c) throws IOException { method in class:BufferedWriter
163 * however, then this method will flush the buffer and write the characters
169 * @param len Number of characters to write
173 public void write(char cbuf[], int off, int len) throws IOException { method in class:BufferedWriter
185 flush the buffer and then write the data directly. In this
188 out.write(cbuf, off, len);
209 * method in the {@linkplain java.io.Writer#write(jav
219 public void write(String s, int off, int len) throws IOException { method in class:BufferedWriter
[all...]
H A DFileOutputStream.java19 * 2 along with this work; if not, write to the Free Software Foundation,
89 * Creates a file output stream to write to the file with the
105 * <code>checkWrite</code> method denies write access
114 * Creates a file output stream to write to the file with the specified
134 * <code>checkWrite</code> method denies write access
146 * Creates a file output stream to write to the file represented by
164 * <code>checkWrite</code> method denies write access
175 * Creates a file output stream to write to the file represented by
196 * <code>checkWrite</code> method denies write access
228 * Creates a file output stream to write t
297 public void write(int b) throws IOException { method in class:FileOutputStream
308 public void write(byte b[]) throws IOException { method in class:FileOutputStream
321 public void write(byte b[], int off, int len) throws IOException { method in class:FileOutputStream
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DByteArrayOutputStreamTest.java74 // to. We don't throw an exception if attempt is made to write.
81 * java.io.ByteArrayOutputStream(); bos.write (fileString.getBytes(), 0,
83 * fail("IOException closing stream"); } try { bos.write
94 bos.write(fileString.getBytes(), 0, 100);
104 bos.write(fileString.getBytes(), 0, 100);
117 bos.write(fileString.getBytes(), 0, fileString.length());
130 bos.write(fileString.getBytes("UTF-8"), 0, fileString.length());
135 bos.write(fileString.getBytes("UTF-8"), 0, fileString.length());
145 bos.write(fileString.getBytes(), 0, fileString.length());
156 bos.write(fileStrin
[all...]
H A DCharArrayWriterTest.java67 cw.write("HelloWorld", 5, 5);
69 cw.write("HelloWorld", 0, 5);
82 cw.write(hw, 5, 5);
90 cw.write("HelloWorld", 0, 10);
102 cw.write("HelloWorld", 5, 5);
108 * java.io.CharArrayWriter#write(char[], int, int)
111 cw.write(hw, 5, 5);
115 assertEquals("Writer failed to write correct chars", "World",
120 * java.io.CharArrayWriter#write(char[], int, int)
126 obj.write(ne
[all...]
H A DPipedWriterTest.java83 pw.write(buf);
102 pw.write(buf);
103 fail("Should have thrown exception when attempting to write to closed writer.");
121 pw.write(buf);
124 assertEquals("Failed to write correct chars", "HelloWorld", new String(
138 pw.write(buf);
174 * java.io.PipedWriter#write(char[], int, int)
177 // Test for method void java.io.PipedWriter.write(char [], int, int)
183 pw.write(buf, 0, 10);
186 assertEquals("Failed to write correc
[all...]
H A DOutputStreamWriterTest.java101 writer.write(source);
108 * Class under test for void write(char[], int, int)
115 writer.write((char[]) null, -1, -1);
123 writer.write((char[]) null, 1, -1);
130 writer.write((char[]) null, 1, 1);
136 writer.write(new char[0], 0, 1);
142 writer.write(chars, -1, 1);
148 writer.write(chars, 0, -1);
154 writer.write(chars, 1, chars.length);
159 writer.write(char
[all...]
H A DFileOutputStreamTest.java84 fos.write('l');
113 fos.write("HI".getBytes(), 0, 2);
116 fos.write(fileString.getBytes());
160 fos.write(fileString.getBytes());
180 * java.io.FileOutputStream#write(byte[])
185 fos.write(fileString.getBytes());
194 * java.io.FileOutputStream#write(byte[], int, int)
199 fos.write(fileString.getBytes(), 0, fileString.length());
210 out.write(null, 0, 0);
221 * java.io.FileOutputStream#write(in
[all...]
H A DRandomAccessFileTest.java61 raf.write(20);
67 raf.write(20);
73 raf.write(20);
99 raf.write("Test".getBytes(), 0, 4);
103 raf.write("Test".getBytes(), 0, 4);
107 raf.write("Test".getBytes(), 0, 4);
162 raf.write("Test".getBytes(), 0, 4);
188 raf.write(fileString.getBytes(), 0, 1000);
200 raf.write(fileString.getBytes());
212 fos.write(fileStrin
[all...]
H A DPipedOutputStreamTest.java92 out.write('b');
142 out.write("HelloWorld".getBytes("UTF-8"), 0, 10);
149 * java.io.PipedOutputStream#write(byte[], int, int)
155 out.write("HelloWorld".getBytes("UTF-8"), 0, 10);
161 * java.io.PipedOutputStream#write(byte[], int, int) Regression for
169 pos.write(new byte[0], -1, -1);
178 out.write(null, -10, 10);
187 pos.write(new byte[0], 0, 0);
192 pos.write(new byte[0], -1, 0);
201 pos.write(nul
[all...]
H A DFilterOutputStreamTest.java46 os.write('t');
55 os.write(fileString.getBytes(), 0, 500);
67 os.write(fileString.getBytes(), 0, 500);
74 * java.io.FilterOutputStream#write(byte[])
79 os.write(fileString.getBytes());
91 * java.io.FilterOutputStream#write(byte[], int, int)
96 os.write(fileString.getBytes(), 0, fileString.length());
108 * java.io.FilterOutputStream#write(int)
113 os.write('t');
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
H A DInflaterOutputStreamTest.java204 ios.write(compressedBytes[i]);
216 ios.write(compressedBytes[i]);
229 * java.util.zip.InflaterOutputStream#write(int)
237 ios.write(compressedBytes[i]);
246 * java.util.zip.InflaterOutputStream#write(int)
250 // write after close
254 ios.write(-1);
262 * java.util.zip.InflaterOutputStream#write(byte[], int, int)
269 ios.write(compressedBytes, 0, length);
277 * java.util.zip.InflaterOutputStream#write(byt
[all...]
H A DCheckedOutputStreamTest.java61 chkOut.write(byteArray[4]);
68 chkOut.write(byteArray, 5, 4);
84 * java.util.zip.CheckedOutputStream#write(int)
95 chkOut.write(element);
109 * java.util.zip.CheckedOutputStream#write(byte[], int, int)
119 chkOut.write(byteArray, 4, 5);
125 chkOut.write(byteArray, 4, 6);
137 fail("Index for write is out of bounds");
H A DDeflaterOutputStreamTest.java110 dos.write(byteArray);
128 dos.write(outputBuf);
175 dos.write(byteArray);
188 + " write.",
204 dos.write(byteArray);
227 // Test to write to a closed DeflaterOutputStream
229 dos.write(5);
234 // Test to write to a FileOutputStream that should have been closed
238 fos.write(("testing").getBytes());
257 dos.write(byteArra
[all...]
/libcore/ojluni/src/main/java/java/security/
H A DDigestOutputStream.java18 * 2 along with this work; if not, write to the Free Software Foundation,
42 * {@link #write(int) write} methods.
46 * {@code write} methods results in
114 public void write(int b) throws IOException { method in class:DigestOutputStream
115 out.write(b);
144 public void write(byte[] b, int off, int len) throws IOException { method in class:DigestOutputStream
148 throw new IllegalArgumentException("wrong parameters for write");
151 throw new IndexOutOfBoundsException("wrong index for write");
154 out.write(
[all...]
/libcore/support/src/test/java/tests/support/
H A DSupport_StringWriter.java103 * the non-null array containing characters to write.
107 * maximum number of characters to write
113 public void write(char[] buf, int offset, int count) { method in class:Support_StringWriter
131 * The character to write
135 public void write(int oneChar) { method in class:Support_StringWriter
146 * the non-null String containing the characters to write.
150 public void write(String str) { method in class:Support_StringWriter
162 * the non-null String containing the characters to write.
166 * the number of characters to retrieve and write.
172 public void write(Strin method in class:Support_StringWriter
[all...]
H A DStreams.java41 out.write(buffer, 0, count);
54 out.write(buffer, 0, count);
/libcore/luni/src/test/java/libcore/java/io/
H A DOldCharArrayWriterTest.java48 cw.write(target, -1, 1);
54 cw.write(target, 0, -1);
60 cw.write(target, 1, target.length);
66 cw.write((char[]) null, 1, 1);
75 cw.write("HelloWorld", 0, 10);
79 assertEquals("Test 1: Writer failed to write correct chars;",
H A DOldPipedWriterTest.java99 pw.write(testBuf);
101 fail("Test 2: Could not write to the constructed writer: "
143 pw.write(testBuf);
163 pw.write(testBuf);
173 pw.write(testBuf, 0, 5);
182 pw.write(testBuf, -1, 1);
189 pw.write(testBuf, 0, -1);
196 pw.write(testBuf, 5, testString.length());
207 pw.write(testBuf, 0, testLength);
219 pw.write(testBu
[all...]
H A DOutputStreamWriterTest.java26 public void write(int b) { method in class:OutputStreamWriterTest.FlushCountingOutputStream
39 writer.write(chars);
50 // We write enough characters to fill that, but leave data in the encoder.
52 // On flush/close, the writer needs to admit defeat and write the replacement character.
58 writer.write(cs, 0, cs.length);
62 writer.write(0xdf9f);
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
H A DDigestOutputStreamTest.java138 * Test #1 for <code>write(int)</code> method<br>
151 dos.write(myMessage[i]);
154 assertTrue("write", Arrays.equals(MDGoldenData.getMessage(), bos.toByteArray()));
167 * Test #2 for <code>write(int)</code> method<br>
170 * Assertion: <code>write(int)</code> must not update digest if it is off<br>
187 dos.write(myMessage[i]);
191 assertTrue("write", Arrays.equals(MDGoldenData.getMessage(), bos.toByteArray()));
192 // check that digest value has not been updated by write()
204 * Test #3 for <code>write(int)</code> method<br>
207 * <code>OutputStream</code> not set. <code>write(in
661 public void write(int arg0) throws IOException { method in class:DigestOutputStreamTest.MyOutputStream
[all...]
/libcore/luni/src/test/java/libcore/java/nio/channels/
H A DOldFileChannelTest.java149 writeOnlyFileChannel.write(writeBuffer);
157 writeOnlyFileChannel.write(writeBuffer);
180 fos.write(CONTENT_AS_BYTES);
201 fos.write(buf);
646 out.write(1);
657 readOnlyFileChannel.write(writeBuffer);
665 writeOnlyFileChannel.write(writeBuffer);
673 readWriteFileChannel.write(writeBuffer);
688 readOnlyFileChannel.write((ByteBuffer) null);
696 writeOnlyFileChannel.write((ByteBuffe
[all...]
/libcore/ojluni/src/main/java/java/nio/channels/
H A DDatagramChannel.java18 * 2 along with this work; if not, write to the Free Software Foundation,
49 * #write(java.nio.ByteBuffer) write} methods, since those methods do not
266 * on read or write operations that are already in progress at the moment
308 * on read or write operations that are already in progress at the moment
410 * {@link WritableByteChannel#write(java.nio.ByteBuffer) write} operation.
423 * already initiated a write operation upon this channel, however, then an
528 public abstract int write(ByteBuffer src) throws IOException; method in class:DatagramChannel
547 public abstract long write(ByteBuffe method in class:DatagramChannel
567 public final long write(ByteBuffer[] srcs) throws IOException { method in class:DatagramChannel
[all...]

Completed in 357 milliseconds

1234567891011>>