MCPcopy Index your code
hub / github.com/davidgiven/luje / flush

Method flush

lib/java/io/OutputStreamWriter.java:179–191  ·  view source on GitHub ↗

Flushes this writer. This implementation ensures that all buffered bytes are written to the target stream. After writing the bytes, the target stream is flushed as well. @throws IOException if an error occurs while flushing this writer.

()

Source from the content-addressed store, hash-verified

177 * if an error occurs while flushing this writer.
178 */
179 @Override
180 public void flush() throws IOException {
181 synchronized (lock) {
182 checkStatus();
183 int position;
184 if ((position = bytes.position()) > 0) {
185 bytes.flip();
186 out.write(bytes.array(), 0, position);
187 bytes.clear();
188 }
189 out.flush();
190 }
191 }
192
193 private void checkStatus() throws IOException {
194 if (encoder == null) {

Callers 2

closeMethod · 0.95
convertMethod · 0.95

Calls 7

checkStatusMethod · 0.95
positionMethod · 0.80
flipMethod · 0.80
writeMethod · 0.65
clearMethod · 0.65
flushMethod · 0.65
arrayMethod · 0.45

Tested by

no test coverage detected