congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
BufferedWriter.checkNotClosed
Code IndexAdd Tabnine to your IDE (free)

How to use
checkNotClosed
method
in
java.io.BufferedWriter

Best Java code snippets using java.io.BufferedWriter.checkNotClosed (Showing top 20 results out of 315)

origin: robovm/robovm

/**
 * Writes the character {@code oneChar} to this writer. If the buffer
 * gets full by writing this character, this writer is flushed. Only the
 * lower two bytes of the integer {@code oneChar} are written.
 *
 * @param oneChar
 *            the character to write.
 * @throws IOException
 *             if this writer is closed or another I/O error occurs.
 */
@Override
public void write(int oneChar) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (pos >= buf.length) {
      out.write(buf, 0, buf.length);
      pos = 0;
    }
    buf[pos++] = (char) oneChar;
  }
}
origin: robovm/robovm

/**
 * Flushes this writer. The contents of the buffer are committed to the
 * target writer and it is then flushed.
 *
 * @throws IOException
 *             if an error occurs while flushing this writer.
 */
@Override
public void flush() throws IOException {
  synchronized (lock) {
    checkNotClosed();
    flushInternal();
    out.flush();
  }
}
origin: robovm/robovm

public void write(String str, int offset, int count) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (count <= 0) {
      return;
origin: robovm/robovm

public void write(char[] buffer, int offset, int count) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (buffer == null) {
      throw new NullPointerException("buffer == null");
origin: com.jtransc/jtransc-rt

/**
 * Writes the character {@code oneChar} to this writer. If the buffer
 * gets full by writing this character, this writer is flushed. Only the
 * lower two bytes of the integer {@code oneChar} are written.
 *
 * @param oneChar
 *            the character to write.
 * @throws IOException
 *             if this writer is closed or another I/O error occurs.
 */
@Override
public void write(int oneChar) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (pos >= buf.length) {
      out.write(buf, 0, buf.length);
      pos = 0;
    }
    buf[pos++] = (char) oneChar;
  }
}
origin: ibinti/bugvm

/**
 * Writes the character {@code oneChar} to this writer. If the buffer
 * gets full by writing this character, this writer is flushed. Only the
 * lower two bytes of the integer {@code oneChar} are written.
 *
 * @param oneChar
 *            the character to write.
 * @throws IOException
 *             if this writer is closed or another I/O error occurs.
 */
@Override
public void write(int oneChar) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (pos >= buf.length) {
      out.write(buf, 0, buf.length);
      pos = 0;
    }
    buf[pos++] = (char) oneChar;
  }
}
origin: com.bugvm/bugvm-rt

/**
 * Writes the character {@code oneChar} to this writer. If the buffer
 * gets full by writing this character, this writer is flushed. Only the
 * lower two bytes of the integer {@code oneChar} are written.
 *
 * @param oneChar
 *            the character to write.
 * @throws IOException
 *             if this writer is closed or another I/O error occurs.
 */
@Override
public void write(int oneChar) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (pos >= buf.length) {
      out.write(buf, 0, buf.length);
      pos = 0;
    }
    buf[pos++] = (char) oneChar;
  }
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Writes the character {@code oneChar} to this writer. If the buffer
 * gets full by writing this character, this writer is flushed. Only the
 * lower two bytes of the integer {@code oneChar} are written.
 *
 * @param oneChar
 *            the character to write.
 * @throws IOException
 *             if this writer is closed or another I/O error occurs.
 */
@Override
public void write(int oneChar) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (pos >= buf.length) {
      out.write(buf, 0, buf.length);
      pos = 0;
    }
    buf[pos++] = (char) oneChar;
  }
}
origin: MobiVM/robovm

/**
 * Writes the character {@code oneChar} to this writer. If the buffer
 * gets full by writing this character, this writer is flushed. Only the
 * lower two bytes of the integer {@code oneChar} are written.
 *
 * @param oneChar
 *            the character to write.
 * @throws IOException
 *             if this writer is closed or another I/O error occurs.
 */
@Override
public void write(int oneChar) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (pos >= buf.length) {
      out.write(buf, 0, buf.length);
      pos = 0;
    }
    buf[pos++] = (char) oneChar;
  }
}
origin: com.gluonhq/robovm-rt

/**
 * Writes the character {@code oneChar} to this writer. If the buffer
 * gets full by writing this character, this writer is flushed. Only the
 * lower two bytes of the integer {@code oneChar} are written.
 *
 * @param oneChar
 *            the character to write.
 * @throws IOException
 *             if this writer is closed or another I/O error occurs.
 */
@Override
public void write(int oneChar) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (pos >= buf.length) {
      out.write(buf, 0, buf.length);
      pos = 0;
    }
    buf[pos++] = (char) oneChar;
  }
}
origin: FlexoVM/flexovm

/**
 * Writes the character {@code oneChar} to this writer. If the buffer
 * gets full by writing this character, this writer is flushed. Only the
 * lower two bytes of the integer {@code oneChar} are written.
 *
 * @param oneChar
 *            the character to write.
 * @throws IOException
 *             if this writer is closed or another I/O error occurs.
 */
@Override
public void write(int oneChar) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (pos >= buf.length) {
      out.write(buf, 0, buf.length);
      pos = 0;
    }
    buf[pos++] = (char) oneChar;
  }
}
origin: MobiVM/robovm

/**
 * Flushes this writer. The contents of the buffer are committed to the
 * target writer and it is then flushed.
 *
 * @throws IOException
 *             if an error occurs while flushing this writer.
 */
@Override
public void flush() throws IOException {
  synchronized (lock) {
    checkNotClosed();
    flushInternal();
    out.flush();
  }
}
origin: com.jtransc/jtransc-rt

/**
 * Flushes this writer. The contents of the buffer are committed to the
 * target writer and it is then flushed.
 *
 * @throws IOException
 *             if an error occurs while flushing this writer.
 */
@Override
public void flush() throws IOException {
  synchronized (lock) {
    checkNotClosed();
    flushInternal();
    out.flush();
  }
}
origin: FlexoVM/flexovm

/**
 * Flushes this writer. The contents of the buffer are committed to the
 * target writer and it is then flushed.
 *
 * @throws IOException
 *             if an error occurs while flushing this writer.
 */
@Override
public void flush() throws IOException {
  synchronized (lock) {
    checkNotClosed();
    flushInternal();
    out.flush();
  }
}
origin: com.bugvm/bugvm-rt

/**
 * Flushes this writer. The contents of the buffer are committed to the
 * target writer and it is then flushed.
 *
 * @throws IOException
 *             if an error occurs while flushing this writer.
 */
@Override
public void flush() throws IOException {
  synchronized (lock) {
    checkNotClosed();
    flushInternal();
    out.flush();
  }
}
origin: ibinti/bugvm

/**
 * Flushes this writer. The contents of the buffer are committed to the
 * target writer and it is then flushed.
 *
 * @throws IOException
 *             if an error occurs while flushing this writer.
 */
@Override
public void flush() throws IOException {
  synchronized (lock) {
    checkNotClosed();
    flushInternal();
    out.flush();
  }
}
origin: com.mobidevelop.robovm/robovm-rt

/**
 * Flushes this writer. The contents of the buffer are committed to the
 * target writer and it is then flushed.
 *
 * @throws IOException
 *             if an error occurs while flushing this writer.
 */
@Override
public void flush() throws IOException {
  synchronized (lock) {
    checkNotClosed();
    flushInternal();
    out.flush();
  }
}
origin: com.gluonhq/robovm-rt

/**
 * Flushes this writer. The contents of the buffer are committed to the
 * target writer and it is then flushed.
 *
 * @throws IOException
 *             if an error occurs while flushing this writer.
 */
@Override
public void flush() throws IOException {
  synchronized (lock) {
    checkNotClosed();
    flushInternal();
    out.flush();
  }
}
origin: ibinti/bugvm

public void write(char[] buffer, int offset, int count) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (buffer == null) {
      throw new NullPointerException("buffer == null");
origin: com.jtransc/jtransc-rt

public void write(char[] buffer, int offset, int count) throws IOException {
  synchronized (lock) {
    checkNotClosed();
    if (buffer == null) {
      throw new NullPointerException("buffer == null");
java.ioBufferedWritercheckNotClosed

Popular methods of BufferedWriter

  • <init>
    Constructs a new BufferedWriter, providing out with size chars of buffer.
  • write
    Writes count characters starting at offset in buffer to this writer. If count is greater than this w
  • close
    Closes this writer. The contents of the buffer are flushed, the target writer is closed, and the buf
  • flush
    Flushes this writer. The contents of the buffer are committed to the target writer and it is then fl
  • newLine
    Writes a newline to this writer. On Android, this is "\n". The target writer may or may not be flush
  • append
  • flushInternal
    Flushes the internal buffer.
  • isClosed
    Indicates whether this writer is closed.
  • drain
  • ensureOpen
    Checks to make sure that the stream has not been closed
  • flushBuffer
    Flushes the output buffer to the underlying character stream, without flushing the stream itself. Th
  • min
    Our own little min method, to avoid loading java.lang.Math if we've run out of file descriptors and
  • flushBuffer,
  • min

Popular in Java

  • Parsing JSON documents to java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
  • getSystemService (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now