本文整理了Java中org.eclipse.jetty.util.IO.toString()
方法的一些代码示例,展示了IO.toString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。IO.toString()
方法的具体详情如下:
包路径:org.eclipse.jetty.util.IO
类名称:IO
方法名:toString
[英]Read input stream to string.
[中]
代码示例来源:origin: org.eclipse.jetty/jetty-util
/** Read input stream to string.
* @param in the stream to read from (until EOF)
* @return the String parsed from stream (default Charset)
* @throws IOException if unable to read the stream (or handle the charset)
*/
public static String toString(InputStream in)
throws IOException
{
return toString(in,(Charset)null);
}
代码示例来源:origin: org.eclipse.jetty/jetty-util
/** Read input stream to string.
* @param in the stream to read from (until EOF)
* @param encoding the encoding to use (can be null to use default Charset)
* @return the String parsed from the stream
* @throws IOException if unable to read the stream (or handle the charset)
*/
public static String toString(InputStream in,String encoding)
throws IOException
{
return toString(in, encoding==null?null:Charset.forName(encoding));
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/** Read input stream to string.
*/
public static String toString(InputStream in)
throws IOException
{
return toString(in,null);
}
代码示例来源:origin: Nextdoor/bender
/** Read input stream to string.
*/
public static String toString(InputStream in)
throws IOException
{
return toString(in,(Charset)null);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
/** Read input stream to string.
*/
public static String toString(InputStream in)
throws IOException
{
return toString(in,null);
}
代码示例来源:origin: jenkinsci/winstone
/** Read input stream to string.
* @param in the stream to read from (until EOF)
* @return the String parsed from stream (default Charset)
* @throws IOException if unable to read the stream (or handle the charset)
*/
public static String toString(InputStream in)
throws IOException
{
return toString(in,(Charset)null);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
/** Read input stream to string.
*/
public static String toString(InputStream in)
throws IOException
{
return toString(in,null);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
/** Read input stream to string.
*/
public static String toString(InputStream in)
throws IOException
{
return toString(in,null);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
/** Read input stream to string.
*/
public static String toString(InputStream in)
throws IOException
{
return toString(in,null);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/** Read input stream to string.
*/
public static String toString(InputStream in)
throws IOException
{
return toString(in,null);
}
代码示例来源:origin: Nextdoor/bender
/** Read input stream to string.
*/
public static String toString(InputStream in,String encoding)
throws IOException
{
return toString(in, encoding==null?null:Charset.forName(encoding));
}
代码示例来源:origin: jenkinsci/winstone
/** Read input stream to string.
* @param in the stream to read from (until EOF)
* @param encoding the encoding to use (can be null to use default Charset)
* @return the String parsed from the stream
* @throws IOException if unable to read the stream (or handle the charset)
*/
public static String toString(InputStream in,String encoding)
throws IOException
{
return toString(in, encoding==null?null:Charset.forName(encoding));
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
/**
* @deprecated use {@link #parse(Reader)}
* @param in
* Reader containing JSON object or array.
* @return A Map, Object array or primitive array parsed from the JSON.
*/
@Deprecated
public static Object parse(InputStream in) throws IOException
{
return DEFAULT.parse(new StringSource(IO.toString(in)),false);
}
代码示例来源:origin: org.eclipse.jetty/jetty-util-ajax
/**
* @param in
* Reader containing JSON object or array.
* @return A Map, Object array or primitive array parsed from the JSON.
* @throws IOException if unable to parse
* @deprecated use {@link #parse(Reader)}
*/
@Deprecated
public static Object parse(InputStream in) throws IOException
{
return DEFAULT.parse(new StringSource(IO.toString(in)),false);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
/**
* @deprecated use {@link #parse(Reader)}
* @param in
* Reader containing JSON object or array.
* @return A Map, Object array or primitive array parsed from the JSON.
*/
@Deprecated
public static Object parse(InputStream in) throws IOException
{
return DEFAULT.parse(new StringSource(IO.toString(in)),false);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
/**
* @deprecated use {@link #parse(Reader, boolean)}
* @param in
* Stream containing JSON object or array.
* @param stripOuterComment
* If true, an outer comment around the JSON is ignored.
* @return A Map, Object array or primitive array parsed from the JSON.
*/
@Deprecated
public static Object parse(InputStream in, boolean stripOuterComment) throws IOException
{
return DEFAULT.parse(new StringSource(IO.toString(in)),stripOuterComment);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
/**
* @deprecated use {@link #parse(Reader, boolean)}
* @param in
* Stream containing JSON object or array.
* @param stripOuterComment
* If true, an outer comment around the JSON is ignored.
* @return A Map, Object array or primitive array parsed from the JSON.
*/
@Deprecated
public static Object parse(InputStream in, boolean stripOuterComment) throws IOException
{
return DEFAULT.parse(new StringSource(IO.toString(in)),stripOuterComment);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
/**
* @deprecated use {@link #parse(Reader)}
* @param in
* Reader containing JSON object or array.
* @return A Map, Object array or primitive array parsed from the JSON.
*/
@Deprecated
public static Object parse(InputStream in) throws IOException
{
return DEFAULT.parse(new StringSource(IO.toString(in)),false);
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
/**
* @deprecated use {@link #parse(Reader)}
* @param in
* Reader containing JSON object or array.
* @return A Map, Object array or primitive array parsed from the JSON.
*/
@Deprecated
public static Object parse(InputStream in) throws IOException
{
return DEFAULT.parse(new StringSource(IO.toString(in)),false);
}
代码示例来源:origin: org.jbpm.contrib/repository
private String getResponse(URI uri) throws IOException {
HttpURLConnection http = (HttpURLConnection) uri.toURL().openConnection();
assertThat("Valid Response Code",
http.getResponseCode(),
anyOf(is(200),
is(404)));
try (InputStream in = http.getInputStream()) {
return IO.toString(in,
StandardCharsets.UTF_8);
}
}
内容来源于网络,如有侵权,请联系作者删除!