
org.postgresql.util.internal.SourceStreamIOException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of org.apache.servicemix.bundles.postgresql
Show all versions of org.apache.servicemix.bundles.postgresql
This OSGi bundle wraps ${pkgArtifactId} ${pkgVersion} jar file.
/*
* Copyright (c) 2024, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
package org.postgresql.util.internal;
import static org.postgresql.util.internal.Nullness.castNonNull;
import java.io.IOException;
/**
* A marker exception class to distinguish between "IOException when reading the data" and
* "IOException when writing the data" when transferring data from one stream to another.
*/
public class SourceStreamIOException extends IOException {
/**
* The number of bytes remaining to transfer to the destination stream.
*/
private final int bytesRemaining;
public SourceStreamIOException(int bytesRemaining, IOException cause) {
super(cause);
this.bytesRemaining = bytesRemaining;
}
public int getBytesRemaining() {
return bytesRemaining;
}
@Override
public synchronized IOException getCause() {
return (IOException) castNonNull(super.getCause());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy