view src/goodjava/rpc/FixedLengthInputStream.java @ 2041:cd51e7e31950 acme-tiny

use try/catch/finally to clean up temp dir even on error
author Violet7
date Sun, 09 Nov 2025 01:56:58 -0800
parents 491b355acef7
children
line wrap: on
line source

package goodjava.rpc;

import java.io.InputStream;
import java.io.IOException;
import java.io.EOFException;


final class FixedLengthInputStream extends goodjava.io.FixedLengthInputStream {

	public FixedLengthInputStream(InputStream in,long len) {
		super(in,len);
	}

    public void close() throws IOException {
        while( left > 0 ) {
			if( skip(left) == 0 )
				throw new EOFException();
		}
    }

}