All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.audioattack.io.UncloseableReader Maven / Gradle / Ivy

Go to download

A replacement for java.io.Console with a System.in and System.out based fallback

There is a newer version: 1.2.1
Show newest version
/*
 * SPDX-FileCopyrightText: 2021 Marc Nause 
 *
 * SPDX-License-Identifier: Apache-2.0
 */

package de.audioattack.io;

import java.io.IOException;
import java.io.Reader;
import java.util.Objects;

/* default */ class UncloseableReader extends Reader {

    private final Reader reader;

    UncloseableReader(final Reader reader) {
        this.reader = Objects.requireNonNull(reader, "reader must not be ");
    }

    @Override
    public int read(final char[] cbuff, final int off, final int len) throws IOException {
        return reader.read(cbuff, off, len);
    }

    @Override
    public void close() {
        // ignore close
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy