Java中有一个Null OutputStream吗?(Is there a Null OutputStream in Java?)
我需要为我使用的API指定一个
OutputStream
,但实际上并不需要输出。 Java是否具有等效于> /dev/null
的OutputStream
?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 anOutputStream
equivalent to> /dev/null
?
原文:https://stackoverflow.com/questions/691813
最满意答案
你在这里混淆了几个概念。 只是因为一个版本稍后发布,并不意味着它有更多的功能。 .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.
相关问答
更多-
看起来像你使用dotnet new sln --name mysolution.sln https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-new looks like you use dotnet new sln --name mysolution.sln https://docs.microsoft.com/en-us/dotnet/articles/core/tools/dotnet-new
-
虽然这不是我想要的答案,但它是通过https://github.com/dotnet/cli/issues/3274解决的。 最重要的是,.NET CLI团队希望所有工具都是跨平台的,我理解。 它只是提出了一些问题,而跨平台框架没有完整框架的所有功能。 While it wasn't the answer I was looking for, it was addressed at https://github.com/dotnet/cli/issues/3274 The bottom line is th ...
-
你在这里混淆了几个概念。 只是因为一个版本稍后发布,并不意味着它有更多的功能。 .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 ...
-
在类库中csproj从include中的包中删除单词Dotnet : 错误的方法:
正确的方法: M ... -
正如本次公布的突破RC2的变化 : EntityFramework。*包和名称空间正在更改为Microsoft.EntityFrameworkCore。* 所以你只需要将你的参考切换到更新后的版本即可: "Microsoft.EntityFrameworkCore": "1.0.0-*", As mentioned in this announcement of breaking changes in RC2 : The EntityFramework.* packages and namespaces ...
-
使用MSBuild构建混合DotNet Core / .NET Framework(Hybrid DotNet Core/.NET Framework Build with MSBuild)[2022-08-01]
我现在找到的唯一方法是创建一个编译配置,我将所有.NetCore和.net标准项目和另一个所有.Net项目(或简单地使用发布配置)作为目标。 然后我使用MsBuild两次构建。 MSBuild.exe MySolution.sln / p:Configuration = DotNetCore MSBuild.exe MySolution.sln / p:Configuration = Release 它适用于VS2017解决方案。 Copy the sdks folder from the dotnet c ... -
将dotnet core cli mvc应用程序部署到azure webservice(deploy dotnet core cli mvc application to azure webservice)[2021-07-07]
我尝试了一个示例项目: D:\dotnetDummy>dotnet publish Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved. dotnetDummy -> D:\dotnetDummy\bin\Debug\netcoreapp2.0\dotnetDummy.dll dotnetDummy -> D: ... -
VS2015工具包适用于希望使用Visual Studio 2015编译和调试.NET核心代码的人员。 Visual Studio 2015是Visual Studio Code的完全独立的产品,因此如果您只使用VS Code,则不需要此工具预览包。 The VS2015 tooling package is for people wanting to compile and debug .NET core code using Visual Studio 2015. Visual Studio 2015 ...
-
当我使用CLI或包管理器使用Nuget时,我发现安装某些工具很麻烦。 在过去,我不得不在csproj文件中直接安装工具。 检查您的csproj文件,看看SqlConfig的安装是否已成立。 如果它不只是添加它并运行一个dotnet还原。 这是一个如何“硬编码”该工具的示例。 ```尝试添加 Microsoft.EntityFrameworkCore.Tools.DotNet 1.0.0-msbuild2-final 关键是msbuild部分,它对我有用。 供您参考,我的整个.csproj如下。
相关文章
更多- Guava学习笔记:Optional优雅的使用null
- Spring Data: a new perspective of data operations
- Solr: a custom Search RequestHandler
- Hibernate 异常之:associate a collection with two ...
- Guava Optional类详解-处理null值
- [转]So You Want To Be A Producer
- Becoming a data scientist
- ServletOutputStream cannot be resolved to a type
- Java 网络编程
- Java添加图片水印
最新问答
更多- 获取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的基本操作命令。。。