|
| 1 | +package com.barista.bufferedinputstream; |
| 2 | + |
| 3 | +import java.io.InputStream; |
| 4 | + |
| 5 | +import liquidjava.specification.ExternalRefinementsFor; |
| 6 | +import liquidjava.specification.Refinement; |
| 7 | +import liquidjava.specification.RefinementAlias; |
| 8 | +import liquidjava.specification.StateRefinement; |
| 9 | +import liquidjava.specification.StateSet; |
| 10 | + |
| 11 | +@RefinementAlias("Positive(int x) {x >= 0}") |
| 12 | +@StateSet({"open", "closed", "marked"}) |
| 13 | +@ExternalRefinementsFor("java.io.BufferedInputStream") |
| 14 | +public interface BufferedInputStreamRefinements { |
| 15 | + |
| 16 | + @StateRefinement(to="open(this)") |
| 17 | + public void BufferedInputStream(InputStream in); |
| 18 | + |
| 19 | + @StateRefinement(to="open(this)") |
| 20 | + public void BufferedInputStream(InputStream in, @Refinement("Positive(_)") int size); |
| 21 | + |
| 22 | + @StateRefinement(from="open(this)", to="open(this)") |
| 23 | + @StateRefinement(from="marked(this)", to="marked(this)") |
| 24 | + public int read(); |
| 25 | + |
| 26 | + @StateRefinement(from="open(this)", to="open(this)") |
| 27 | + @StateRefinement(from="marked(this)", to="marked(this)") |
| 28 | + public int read(byte[] b, |
| 29 | + @Refinement("Positive(_)") int off, |
| 30 | + @Refinement("Positive(_)") int len); |
| 31 | + |
| 32 | + @StateRefinement(from="open(this)", to="open(this)") |
| 33 | + @StateRefinement(from="marked(this)", to="marked(this)") |
| 34 | + public long skip(@Refinement("Positive(_)") long n); |
| 35 | + |
| 36 | + @StateRefinement(from="marked(this)", to="marked(this)") |
| 37 | + public int available(); |
| 38 | + |
| 39 | + @StateRefinement(from="open(this)", to="marked(this)") |
| 40 | + @StateRefinement(from="marked(this)", to="marked(this)") |
| 41 | + public void mark(@Refinement("Positive(_)") int readlimit); |
| 42 | + |
| 43 | + @StateRefinement(from="marked(this)", to="marked(this)") |
| 44 | + public int reset(); |
| 45 | + |
| 46 | + @StateRefinement(from="open(this)", to="open(this)") |
| 47 | + @StateRefinement(from="marked(this)", to="marked(this)") |
| 48 | + public boolean markSupported(); |
| 49 | + |
| 50 | + @StateRefinement(from="open(this)", to="closed(this)") |
| 51 | + @StateRefinement(from="marked(this)", to="closed(this)") |
| 52 | + public boolean close(); |
| 53 | +} |
0 commit comments