首页 \ 问答 \ InputStream vs BufferedInputStream(InputStream vs BufferedInputStream)

InputStream vs BufferedInputStream(InputStream vs BufferedInputStream)

我有以下代码:

httpUrlConnection = (HttpURLConnection) new URL(URL).openConnection();
InputStream in = new BufferedInputStream(httpUrlConnection.getInputStream());
BufferedReader reader =  new BufferedReader(new InputStreamReader(in));

我的问题是,我可以用“InputStream in = httpUrlConnection.getInputStream();”替换第二行吗? ? 会有什么不同吗?


I have the following code:

httpUrlConnection = (HttpURLConnection) new URL(URL).openConnection();
InputStream in = new BufferedInputStream(httpUrlConnection.getInputStream());
BufferedReader reader =  new BufferedReader(new InputStreamReader(in));

My question is, can I just replace the second line with "InputStream in =httpUrlConnection.getInputStream();" ? will it make any difference?


原文:https://stackoverflow.com/questions/45256942
更新时间:2023-07-06 19:07

最满意答案

我认为你需要剃刀明确的文字标记

 <title>My Website @if( string.IsNullOrEmpty( ViewBag.Title) == false){ <text>-</text> @ViewBag.Title}</title>

i think you need razor explicit text markup

 <title>My Website @if( string.IsNullOrEmpty( ViewBag.Title) == false){ <text>-</text> @ViewBag.Title}</title>

相关问答

更多