net.markenwerk:commons-nulls

Some common null objects for Java

License

License

Categories

Categories

Net
GroupId

GroupId

net.markenwerk
ArtifactId

ArtifactId

commons-nulls
Last Version

Last Version

1.0.4
Release Date

Release Date

Type

Type

jar
Description

Description

net.markenwerk:commons-nulls
Some common null objects for Java
Project URL

Project URL

https://github.com/markenwerk/java-commons-nulls
Project Organization

Project Organization

Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH
Source Code Management

Source Code Management

https://github.com/markenwerk/java-commons-nulls

Download commons-nulls

How to add to project

<!-- https://jarcasting.com/artifacts/net.markenwerk/commons-nulls/ -->
<dependency>
    <groupId>net.markenwerk</groupId>
    <artifactId>commons-nulls</artifactId>
    <version>1.0.4</version>
</dependency>
// https://jarcasting.com/artifacts/net.markenwerk/commons-nulls/
implementation 'net.markenwerk:commons-nulls:1.0.4'
// https://jarcasting.com/artifacts/net.markenwerk/commons-nulls/
implementation ("net.markenwerk:commons-nulls:1.0.4")
'net.markenwerk:commons-nulls:jar:1.0.4'
<dependency org="net.markenwerk" name="commons-nulls" rev="1.0.4">
  <artifact name="commons-nulls" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.markenwerk', module='commons-nulls', version='1.0.4')
)
libraryDependencies += "net.markenwerk" % "commons-nulls" % "1.0.4"
[net.markenwerk/commons-nulls "1.0.4"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Some common null objects for Java

Build Status Coverage Status Dependency Status Maven Central Java SE 6 MIT License

Overview

This is a collection of null objects (i.e. implementations that do nothing) for the following use cases:

This library is hosted in the Maven Central Repository. You can use it with the following coordinates:

<dependency>
	<groupId>net.markenwerk</groupId>
	<artifactId>commons-nulls</artifactId>
	<version>1.0.4</version>
</dependency>

Consult the usage description and Javadoc for further information.

Usage

InputStream and OutputStream

This library provides NullInputStream as a null implementation of an InputStream and NullOutputStream as a null implementation of an OutputStream.

// an InputStream that yields no bytes
InputStream in = new NullInputStream();

// an OutputStream that drops all bytes
OutputStream in = new NullOutputStream();

Reader and Writer

This library provides NullReader as a null implementation of a Reader and NullWriter as a null implementation of a Writer.

// an InputStream that yields no characters
Reader in = new NullReader();

// an OutputStream that drops all characters
Writer in = new NullWriter();
net.markenwerk

Markenwerk

Versions

Version
1.0.4
1.0.3
1.0.2
1.0.1