Tabnine Logo
PrintStream.write
Code IndexAdd Tabnine to your IDE (free)

How to use
write
method
in
java.io.PrintStream

Best Java code snippets using java.io.PrintStream.write (Showing top 20 results out of 3,456)

origin: log4j/log4j

public void write(final byte[] b, final int off, final int len)
  throws IOException {
  System.err.write(b, off, len);
}
origin: log4j/log4j

  public void write(final int b) throws IOException {
    System.err.write(b);
  }
}
origin: log4j/log4j

  public void write(final int b) throws IOException {
    System.out.write(b);
  }
}
origin: log4j/log4j

public void write(final byte[] b, final int off, final int len)
  throws IOException {
  System.out.write(b, off, len);
}
origin: log4j/log4j

public void write(final byte[] b) throws IOException {
  System.err.write(b);
}
origin: log4j/log4j

public void write(final byte[] b) throws IOException {
  System.out.write(b);
}
origin: spockframework/spock

 @Override
 public void write(byte[] b) throws IOException {
  for (PrintStream stream : delegates) {
   stream.write(b);
  }
 }
}
origin: spockframework/spock

@Override
public void write(int b) {
 for (PrintStream stream : delegates) {
  stream.write(b);
 }
}
origin: spockframework/spock

@Override
public void write(byte[] buf, int off, int len) {
 for (PrintStream stream : delegates) {
  stream.write(buf, off, len);
 }
}
origin: EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

@Override
public void output(final String output) throws IOException {
  System.out.write(output.getBytes());
  System.out.flush();
}
origin: EnterpriseQualityCoding/FizzBuzzEnterpriseEdition

@Override
public void output(final String output) throws IOException {
  System.out.write(output.getBytes());
  System.out.flush();
}
origin: AxonFramework/AxonFramework

private void writeDownloadMessage() {
  try (InputStream in = getClass().getClassLoader().getResourceAsStream("axonserver_download.txt")) {
    byte[] buffer = new byte[1024];
    int read;
    while ((read = in.read(buffer, 0, 1024)) >= 0) {
      System.out.write(buffer, 0, read);
    }
  } catch (IOException e) {
    logger.debug("Unable to write download advice. You're on your own now.", e);
  }
}
origin: apache/incubator-pinot

@Override
public void copyFromLocalFile(File srcFile, URI dstUri)
  throws Exception {
 OutputStream stream = _adlStoreClient.createFile(dstUri.getPath(), IfExists.OVERWRITE);
 PrintStream out = new PrintStream(stream);
 byte[] inputStream = IOUtils.toByteArray(new FileInputStream(srcFile));
 out.write(inputStream);
 out.close();
}
origin: apache/maven

@Override
public void write( byte b[], int off, int len )
{
  final PrintStream currentStream = getOutputStreamForCurrentThread();
  synchronized ( currentStream )
  {
    currentStream.write( b, off, len );
    currentStream.notifyAll();
  }
}
origin: apache/maven

  @Override
  public void write( byte b[] )
    throws IOException
  {
    final PrintStream currentStream = getOutputStreamForCurrentThread();
    synchronized ( currentStream )
    {
      currentStream.write( b );
      currentStream.notifyAll();
    }
  }
}
origin: commons-io/commons-io

public static void checkWrite(final OutputStream output) throws Exception {
  try {
    new java.io.PrintStream(output).write(0);
  } catch (final Throwable t) {
    throw new AssertionFailedError(
        "The copy() method closed the stream "
            + "when it shouldn't have. "
            + t.getMessage());
  }
}
origin: twosigma/beakerx

private synchronized void writeStderr(String text) throws IOException {
 boolean sendStderr = OutputManager.sendStderr(text);
 if (!sendStderr) {
  BeakerOutputHandlers hrs = handlers.get(Thread.currentThread().getThreadGroup());
  if (hrs != null && hrs.err_handler != null) {
   hrs.err_handler.write(text);
  } else {
   orig_err.write(text.getBytes(StandardCharsets.UTF_8));
  }
 }
}
origin: twosigma/beakerx

private synchronized void writeStdout(String text) throws IOException {
 boolean sendStdout = OutputManager.sendStdout(text);
 if (!sendStdout) {
  BeakerOutputHandlers hrs = handlers.get(Thread.currentThread().getThreadGroup());
  if (hrs != null && hrs.out_handler != null) {
   hrs.out_handler.write(text);
  } else {
   orig_out.write(text.getBytes(StandardCharsets.UTF_8));
  }
 }
}
origin: iBotPeaches/Apktool

@Override
public void publish(LogRecord record) {
  if (getFormatter() == null) {
    setFormatter(new SimpleFormatter());
  }
  try {
    String message = getFormatter().format(record);
    if (record.getLevel().intValue() >= Level.WARNING.intValue()) {
      System.err.write(message.getBytes());
    } else {
      if (record.getLevel().intValue() >= Level.INFO.intValue()) {
        System.out.write(message.getBytes());
      } else {
        if (verbosity == Verbosity.VERBOSE) {
          System.out.write(message.getBytes());
        }
      }
    }
  } catch (Exception exception) {
    reportError(null, exception, ErrorManager.FORMAT_FAILURE);
  }
}
@Override
origin: neo4j/neo4j

  @Override
  void restore( boolean failure ) throws IOException
  {
    replace( old ).flush();
    if ( failure )
    {
      old.write( buffer.toByteArray() );
    }
  }
};
java.ioPrintStreamwrite

Javadoc

Writes one byte to the target stream. Only the least significant byte of the integer oneByte is written. This stream is flushed if oneByte is equal to the character '\n' and this stream is set to autoFlush.

This stream's error flag is set to true if it is closed or an I/O error occurs.

Popular methods of PrintStream

  • println
    Prints an array of characters and then terminate the line. This method behaves as though it invokes
  • print
    Prints an array of characters. The characters are converted into bytes according to the platform's d
  • <init>
  • printf
    Prints a formatted string. The behavior of this method is the same as this stream's #format(Locale,
  • flush
    Flushes the stream. This is done by writing any buffered output bytes to the underlying output strea
  • close
    Closes the stream. This is done by flushing the stream and then closing the underlying output stream
  • format
    Writes a string formatted by an intermediate Formatter to this stream using the specified locale, fo
  • append
  • checkError
    Flushes the stream and checks its error state. The internal error state is set to true when the unde
  • setError
    Sets the error state of the stream to true. This method will cause subsequent invocations of #checkE
  • newline
    Put the line separator String onto the print stream.
  • ensureOpen
    Check to make sure that the stream has not been closed
  • newline,
  • ensureOpen,
  • newLine,
  • requireNonNull,
  • toCharset

Popular in Java

  • Making http post requests using okhttp
  • setContentView (Activity)
  • startActivity (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • From CI to AI: The AI layer in your organization
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