Tabnine Logo
IOUtil.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
com.atlassian.jira.util.IOUtil

Best Java code snippets using com.atlassian.jira.util.IOUtil.toString (Showing top 8 results out of 315)

origin: com.atlassian.jira/jira-core

/**
 * Get the contents of a <code>Reader</code> as a String.
 */
public static String toString(final Reader input) throws IOException
{
  return toString(input, DEFAULT_BUFFER_SIZE);
}
origin: com.atlassian.jira/jira-core

/**
 * Get the contents of a <code>byte[]</code> as a String.
 * The platform's default encoding is used for the byte-to-char conversion.
 */
public static String toString(final byte[] input) throws IOException
{
  return toString(input, DEFAULT_BUFFER_SIZE);
}
origin: com.atlassian.jira/jira-core

/**
 * Get the contents of an <code>InputStream</code> as a String.
 * The platform's default encoding is used for the byte-to-char conversion.
 */
public static String toString(final InputStream input) throws IOException
{
  return toString(input, DEFAULT_BUFFER_SIZE);
}
origin: com.atlassian.jira/jira-core

/**
 * Get the contents of an <code>InputStream</code> as a String.
 * @param encoding The name of a supported character encoding. See the
 *    <a href="http://www.iana.org/assignments/character-sets">IANA
 *    Charset Registry</a> for a list of valid encoding types.
 */
public static String toString(final InputStream input, final String encoding) throws IOException
{
  return toString(input, encoding, DEFAULT_BUFFER_SIZE);
}
origin: com.atlassian.jira/jira-core

/**
 * Get the contents of a <code>byte[]</code> as a String.
 * @param encoding The name of a supported character encoding. See the
 *    <a href="http://www.iana.org/assignments/character-sets">IANA
 *    Charset Registry</a> for a list of valid encoding types.
 */
public static String toString(final byte[] input, final String encoding) throws IOException
{
  return toString(input, encoding, DEFAULT_BUFFER_SIZE);
}
origin: com.atlassian.jira/jira-issue-link-confluence-plugin

private static String getResponseBodyAsString(final Response response) throws ResponseException
{
  // Avoids a warning in the logs about buffering a response of unknown length.
  // TODO: This is a DoS vector, but considered relatively safe for now, as remote JIRA must be applinked.
  final InputStream responseBodyStream = response.getResponseBodyAsStream();
  final String charset = getCharset(response);
  try
  {
    return IOUtil.toString(responseBodyStream, charset);
  }
  catch (final IOException exception)
  {
    throw new ResponseException("Failed to read remote JIRA issue", exception);
  }
}
origin: com.atlassian.jira/jira-issue-link-confluence-plugin

private static String getResponseBodyAsString(final Response response) throws ResponseException
{
  // Avoids a warning in the logs about buffering a response of unknown length.
  // TODO: This is a DoS vector, but considered relatively safe for now, as remote JIRA must be applinked.
  final InputStream responseBodyStream = response.getResponseBodyAsStream();
  final String charset = getCharset(response);
  try
  {
    return IOUtil.toString(responseBodyStream, charset);
  }
  catch (final IOException exception)
  {
    throw new ResponseException("Failed to read remote JIRA issue", exception);
  }
}
origin: com.atlassian.jira/jira-issue-link-remote-jira-plugin

private static String getResponseBodyAsString(final Response response) throws ResponseException
{
  // Avoids a warning in the logs about buffering a response of unknown length.
  // TODO: This is a DoS vector, but considered relatively safe for now, as remote JIRA must be applinked.
  final InputStream responseBodyStream = response.getResponseBodyAsStream();
  final String charset = getCharset(response);
  try
  {
    return IOUtil.toString(responseBodyStream, charset);
  }
  catch (final IOException exception)
  {
    throw new ResponseException("Failed to read remote JIRA issue", exception);
  }
}
com.atlassian.jira.utilIOUtiltoString

Javadoc

Get the contents of an InputStream as a String. The platform's default encoding is used for the byte-to-char conversion.

Popular methods of IOUtil

  • shutdownStream
    Unconditionally close an OutputStream. Equivalent to OutputStream#close(), except any exceptions wil
  • copy
    Copy and convert bytes from a byte[] to chars on aWriter, using the specified encoding.
  • shutdownReader
    Unconditionally close an Reader. Equivalent to Reader#close(), except any exceptions will be ignored
  • shutdownWriter
    Unconditionally close an Writer. Equivalent to Writer#close(), except any exceptions will be ignored
  • toByteArray
    Get the contents of a String as a byte[].

Popular in Java

  • Creating JSON documents from java classes using gson
  • getApplicationContext (Context)
  • getResourceAsStream (ClassLoader)
  • compareTo (BigDecimal)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top PhpStorm plugins
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