Tabnine Logo
LineAppender.append
Code IndexAdd Tabnine to your IDE (free)

How to use
append
method
in
org.apache.sis.io.LineAppender

Best Java code snippets using org.apache.sis.io.LineAppender.append (Showing top 4 results out of 315)

origin: Geomatys/geotoolkit

/**
 * Returns the exception trace as a string. This method get the stack trace using the
 * {@link Throwable#printStackTrace(PrintWriter)} method, then replaces the tabulation
 * characters by 4 white spaces.
 *
 * @param exception The exception to format.
 * @return A string representation of the given exception.
 */
public static String formatStackTrace(final Throwable exception) {
  final StringWriter writer = new StringWriter();
  exception.printStackTrace(new PrintWriter(writer));
  final StringBuilder buffer = new StringBuilder();
  final LineAppender formatter = new LineAppender(buffer);
  formatter.setTabulationWidth(TAB_WIDTH);
  try {
    formatter.append(writer.toString());
  } catch (IOException e) {
    throw new AssertionError(e);
  }
  return buffer.toString();
}
origin: org.apache.sis.core/sis-utility

writer.append(message, 0, length);
  writer.append("\nCaused by: ");     // LineAppender will replace '\n' by the system EOL.
origin: apache/sis

writer.append(message, 0, length);
  writer.append("\nCaused by: ");     // LineAppender will replace '\n' by the system EOL.
origin: apache/sis

  /**
   * Tests a call to {@link LineAppender#flush()} interleaved between two lines,
   * where the second line begin with a tabulation.
   *
   * @throws IOException should never happen, since we are writing in a {@link StringBuilder}.
   *
   * @see <a href="https://issues.apache.org/jira/browse/SIS-140">SIS-140</a>
   */
  @Test
  public void testInterleavedFlush() throws IOException {
    final LineAppender f = (LineAppender) appender;
    f.setTabulationWidth(4);
    f.append("S1");
    f.flush();
    f.append("\tS2");
    assertOutputEquals(f.isTabulationExpanded() ? "S1  S2" : "S1\tS2");
  }
}
org.apache.sis.ioLineAppenderappend

Javadoc

Writes a single character.

Popular methods of LineAppender

  • <init>
    Constructs a formatter which will replaces line separators by the given string.
  • getLineSeparator
    Returns the line separator to be sent to the underlying appendable, or null if EOL sequences are for
  • setTabulationWidth
    Sets the tabulation width, in unit of Unicode characters (code point count).
  • flush
    Sends all pending characters to the underlying appendable, including trailing whitespaces. Note that
  • getTabulationWidth
    Returns the current tabulation width, in unit of Unicode characters (code point count). The default
  • setLineSeparator
    Changes the line separator to be sent to the underlying appendable. This is the string to insert in
  • appendCodePoint
  • appendSurrogate
  • deleteSoftHyphen
    Removes the soft hyphen characters from the given buffer. This is invoked when the buffer is about t
  • endOfLine
    Writes pending non-white characters, discards trailing whitespaces, and resets column position to ze
  • getMaximalLineLength
    Returns the maximal line length, in unit of Unicode characters (code point count). The default value
  • isTabulationExpanded
    Returns true if this formatter expands tabulations into spaces. The default value is false, which me
  • getMaximalLineLength,
  • isTabulationExpanded,
  • lineSeparator,
  • onLineBegin,
  • setTabulationExpanded,
  • toCodePoint,
  • transfer,
  • write,
  • writeLineSeparator

Popular in Java

  • Parsing JSON documents to java classes using gson
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • setContentView (Activity)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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