• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

LearnLib / automatalib / 10248696670

05 Aug 2024 12:21PM UTC coverage: 90.741% (+0.7%) from 90.072%
10248696670

push

github

web-flow
Serialization Overhaul (#81)

* overhaul serizalition code

* unify access to Input(De)Serializers behind facades to leverage the default methods for various input/output channels
* drop implicit buffering/decompressing as this should be decided where the stream are constructed (user-land)
* remove/cleanup the (now) unused code

* taf cleanups

* fix wording

343 of 358 new or added lines in 33 files covered. (95.81%)

7 existing lines in 2 files now uncovered.

15994 of 17626 relevant lines covered (90.74%)

1.68 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/commons/util/src/main/java/net/automatalib/common/util/io/NonClosingInputStream.java
1
/* Copyright (C) 2013-2024 TU Dortmund University
2
 * This file is part of AutomataLib, http://www.automatalib.net/.
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 *     http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16
package net.automatalib.common.util.io;
17

18
import java.io.IOException;
19
import java.io.InputStream;
20

21
/**
22
 * A delegating input stream that does nothing when being closed. This is mainly useful for scenarios where we want to
23
 * close wrappers (to free their resources) but do not want to close the source stream.
24
 */
25
public class NonClosingInputStream extends InputStream {
26

27
    private final InputStream delegate;
28

29
    public NonClosingInputStream(InputStream delegate) {
1✔
30
        this.delegate = delegate;
1✔
31
    }
1✔
32

33
    @Override
34
    public int read(byte[] b) throws IOException {
UNCOV
35
        return this.delegate.read(b);
×
36
    }
37

38
    @Override
39
    public int read() throws IOException {
40
        return this.delegate.read();
1✔
41
    }
42

43
    @Override
44
    public int read(byte[] b, int off, int len) throws IOException {
45
        return this.delegate.read(b, off, len);
1✔
46
    }
47

48
    @Override
49
    public long skip(long n) throws IOException {
50
        return this.delegate.skip(n);
×
51
    }
52

53
    @Override
54
    public int available() throws IOException {
55
        return this.delegate.available();
1✔
56
    }
57

58
    @Override
59
    public void close() {}
1✔
60

61
    @Override
62
    public void mark(int readlimit) {
UNCOV
63
        this.delegate.mark(readlimit);
×
UNCOV
64
    }
×
65

66
    @Override
67
    public void reset() throws IOException {
UNCOV
68
        this.delegate.reset();
×
UNCOV
69
    }
×
70

71
    @Override
72
    public boolean markSupported() {
UNCOV
73
        return this.delegate.markSupported();
×
74
    }
75
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc