Methods Summary |
---|
public int | available()
// Disallow operation if the object has gone out of scope
if (ib == null) {
throw new IllegalStateException(
sm.getString("object.invalidScope"));
}
if (SecurityUtil.isPackageProtectionEnabled()){
try{
Integer result =
(Integer)AccessController.doPrivileged(
new PrivilegedExceptionAction(){
public Object run() throws IOException{
Integer integer = Integer.valueOf(ib.available());
return integer;
}
});
return result.intValue();
} catch(PrivilegedActionException pae){
Exception e = pae.getException();
if (e instanceof IOException){
throw (IOException)e;
} else {
throw new RuntimeException(e.getMessage());
}
}
} else {
return ib.available();
}
|
void | clear()Clear facade.
ib = null;
|
protected java.lang.Object | clone()Prevent cloning the facade.
throw new CloneNotSupportedException();
|
public void | close()Close the stream
Since we re-cycle, we can't allow the call to super.close()
which would permantely disable us.
// Disallow operation if the object has gone out of scope
if (ib == null) {
throw new IllegalStateException(
sm.getString("object.invalidScope"));
}
if (SecurityUtil.isPackageProtectionEnabled()){
try{
AccessController.doPrivileged(
new PrivilegedExceptionAction(){
public Object run() throws IOException{
ib.close();
return null;
}
});
} catch(PrivilegedActionException pae){
Exception e = pae.getException();
if (e instanceof IOException){
throw (IOException)e;
} else {
throw new RuntimeException(e.getMessage());
}
}
} else {
ib.close();
}
|
public int | read()
// Disallow operation if the object has gone out of scope
if (ib == null) {
throw new IllegalStateException(
sm.getString("object.invalidScope"));
}
if (SecurityUtil.isPackageProtectionEnabled()){
try{
Integer result =
(Integer)AccessController.doPrivileged(
new PrivilegedExceptionAction(){
public Object run() throws IOException{
Integer integer = Integer.valueOf(ib.readByte());
return integer;
}
});
return result.intValue();
} catch(PrivilegedActionException pae){
Exception e = pae.getException();
if (e instanceof IOException){
throw (IOException)e;
} else {
throw new RuntimeException(e.getMessage());
}
}
} else {
return ib.readByte();
}
|
public int | read(byte[] b)
// Disallow operation if the object has gone out of scope
if (ib == null) {
throw new IllegalStateException(
sm.getString("object.invalidScope"));
}
if (SecurityUtil.isPackageProtectionEnabled()){
try{
Integer result =
(Integer)AccessController.doPrivileged(
new PrivilegedExceptionAction(){
public Object run() throws IOException{
Integer integer =
Integer.valueOf(ib.read(b, 0, b.length));
return integer;
}
});
return result.intValue();
} catch(PrivilegedActionException pae){
Exception e = pae.getException();
if (e instanceof IOException){
throw (IOException)e;
} else {
throw new RuntimeException(e.getMessage());
}
}
} else {
return ib.read(b, 0, b.length);
}
|
public int | read(byte[] b, int off, int len)
// Disallow operation if the object has gone out of scope
if (ib == null) {
throw new IllegalStateException(
sm.getString("object.invalidScope"));
}
if (SecurityUtil.isPackageProtectionEnabled()){
try{
Integer result =
(Integer)AccessController.doPrivileged(
new PrivilegedExceptionAction(){
public Object run() throws IOException{
Integer integer =
Integer.valueOf(ib.read(b, off, len));
return integer;
}
});
return result.intValue();
} catch(PrivilegedActionException pae){
Exception e = pae.getException();
if (e instanceof IOException){
throw (IOException)e;
} else {
throw new RuntimeException(e.getMessage());
}
}
} else {
return ib.read(b, off, len);
}
|
public int | readLine(byte[] b, int off, int len)
// Disallow operation if the object has gone out of scope
if (ib == null) {
throw new IllegalStateException(
sm.getString("object.invalidScope"));
}
return super.readLine(b, off, len);
|