首页 \ 问答 \ Java中有一个Null OutputStream吗?(Is there a Null OutputStream in Java?)

Java中有一个Null OutputStream吗?(Is there a Null OutputStream in Java?)

我需要为我使用的API指定一个OutputStream ,但实际上并不需要输出。 Java是否具有等效于> /dev/nullOutputStream


I need to specify an OutputStream for an API I'm using, but I don't actually have a need for the output. Does Java have an OutputStream equivalent to > /dev/null?


原文:https://stackoverflow.com/questions/691813
更新时间:2023-05-23 12:05

最满意答案

你在这里混淆了几个概念。 只是因为一个版本稍后发布,并不意味着它有更多的功能。 .NET Core 1.0是一个LTS版本,将提供2或3年iirc的更新。

所以即使在1.1发布之后,还将有1.0的维护来修复错误或安全问题。 在软件开发中一直是这样,看看Java。 Java 1.8发布后,还有Java 1.7的更新。

.NET Core SDK包含用于恢复软件包,构建,部署和运行.NET Core应用程序的dotnet cli工具,它还包含提供框架DLL(如.NET Framework 4.x设置)的.NET Core运行时),您需要运行便携式应用程序。

.NET Core运行时/ SDK独立于CLI工具,也可以通过nuget包获得。

Visual Studio 2015/2017的.NET核心工具只是一组工具,允许Visual Studio添加对新项目类型的支持和构建管道。

用于VS的.NET Core Tools还包含SDK /运行时。

您需要在Azure上运行的内容取决于您的需求,并且Azure App Service实例上安装了哪种运行时,因为它们通常会落后于常规版本。

即,如果您创建了独立应用程序,这些应用程序使用.NET Core运行时部署,那么您只需使用任何版本,因为每个应用程序都有自己的可以并行运行的运行时。

如果要运行便携式应用程序(部署时支持.NET Core框架库),则需要在Azure App Service上安装正确的运行时间(Azure博客通常在新的运行时可用时发布)。

所有其他依赖于您的开发环境。

TL; DR:如果你

  • 使用Visual Studio 2015:安装Visual Studio 2015工具(预览2)*
  • 使用Visual Studio 2017:下载Visual Studio 2017
  • 不要使用Visual Studio,但是要为.NET Core开发/安装.NET Core SDK
  • 不要使用Visual Studio,而是要运行.NET Core Appl:Install .NET Core Runtime

要么

  • .NET Core Runtime(1.0.x或1.1.x):只是运行时
  • dotnet-cli:只是构建/部署工具
  • .NET Core SDK:Runtime + dotnet-cli
  • .NET核心工具Visual Studio:运行时+ dotnet-cli + Visual Studio集成(和新项目模板)

cli工具和Visual Studio工具尚未完成,因此在预览中。 他们应该与VS2017和新的基于MSBuild的项目结构(从xproj迁移到csproj文件)进行RTM,但这不影响运行时/ SDK的状态。


You are confusing a few concepts here. Just because a version is released later, it do not mean it has more features. .NET Core 1.0 ist an LTS release and will be supplied with updates for 2 or 3 years iirc.

So even after 1.1 gets released, there will be maintenance for 1.0 which fix bugs or security issues. This has always been the case in Software development, look at Java. When Java 1.8 got released, there were still updates for Java 1.7.

The .NET Core SDK contains the dotnet cli tools, used to restore the packages, build, deploy and run .NET Core applications and it also contains the .NET Core runtime, which provides the framework DLLs (like .NET Framework 4.x setup) which you need to run portable apps.

The .NET Core runtime/SDK are independent of the CLI tools and can also be obtained via nuget packages.

The .NET Core Tools for Visual Studio 2015/2017 are just a set of tools which allow Visual Studio add support to the new project types and build pipeline.

The .NET Core Tools for VS also contain the SDK/runtime.

What you need to run on Azure, depends on your needs and which kind of runtime is installed on the Azure App Service instances, as they usually lag a bit behind the regular releases.

i.e. if you create self-contained applications, which get deployed with the .NET Core runtime, then you can just use any version, as each application will have its own runtime which can run side-by-side.

If you want run portable applications (which ship w/o .NET Core framework libraries when deployed), then you need to have the correct runtime installed on Azure App Service (Azure blog usually posts when new runtimes become available).

All other depends on your development environment.

TL;DR: If you

  • use Visual Studio 2015: Install Visual Studio 2015 Tools (Preview 2) *
  • use Visual Studio 2017: Download Visual Studio 2017
  • don't use Visual Studio, but want to develop for/with .NET Core: Install .NET Core SDK
  • don't use Visual Studio, but want to run .NET Core Appl: Install .NET Core Runtime

or

  • .NET Core Runtime (1.0.x or 1.1.x): Just the runtime
  • dotnet-cli: Just build/deployment tools
  • .NET Core SDK: Runtime + dotnet-cli
  • .NET Core Tools for Visual Studio: Runtime + dotnet-cli + Visual Studio integration (and new project templates)

cli-tools and Visual Studio Tools are not finished yet, hence in preview. They should go RTM together with VS2017 and the new MSBuild based project structure (moving away from xproj to csproj files), but this do not effect the status of the runtime/SDK.

相关问答

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。