Package java.io

Examples of java.io.IOException.initCause()


import java.io.IOException;

public class _IOException {
  public static IOException createNewInstance(Throwable t){
    IOException io = new IOException();
    io.initCause(t);
    return io;
  }
}
View Full Code Here


        try {
            pngTranscoder.transcode(transcoderInput, transcoderOutput);
        } catch (TranscoderException te) {
          // code compatible with jdk 1.5
            IOException ioe = new IOException("Transcoder error");
            ioe.initCause(te);
            throw ioe;
        }
  }
 
}
View Full Code Here

        try {
            jpegTranscoder.transcode(transcoderInput2, transcoderOutput);
        } catch (TranscoderException te) {
          // code compatible with jdk 1.5
            IOException ioe = new IOException("Transcoder error");
            ioe.initCause(te);
            throw ioe;
        }
  }
 
}
View Full Code Here

      try {
        Future<LobChunk> result = dqp.requestNextLobChunk(streamRequestId, requestId, streamable.getReferenceStreamId());
        return result.get();
      } catch (Exception e) {
          IOException ex = new IOException(JDBCPlugin.Util.getString("StreamImpl.Unable_to_read_data_from_stream", e.getMessage())); //$NON-NLS-1$
          ex.initCause(e);
          throw ex;                       
      }               
  }

  public void close() throws IOException {
View Full Code Here

  public void close() throws IOException {
      try {
        dqp.closeLobChunkStream(streamRequestId, requestId, streamable.getReferenceStreamId());
      } catch (TeiidException e) {
          IOException ex = new IOException(e.getMessage());
          ex.initCause(e);
          throw  ex;
    }                   
  }
}
View Full Code Here

      lastReadTime = lastWriteTime = System.currentTimeMillis();
    } catch (IOException ex) {
      close();
      IOException ioEx = new IOException("Unable to connect to: " + remoteAddress);
      ioEx.initCause(ex);
      throw ioEx;
    }
  }

  public Object readObject (Connection connection) throws IOException {
View Full Code Here

      connectedAddress = remoteAddress;
    } catch (IOException ex) {
      close();
      IOException ioEx = new IOException("Unable to connect to: " + remoteAddress);
      ioEx.initCause(ex);
      throw ioEx;
    }
  }

  public InetSocketAddress readFromAddress () throws IOException {
View Full Code Here

      }
      try {
        out.close();
      } catch (IOException io1) {
        if (ioe != null)
          ioe = (IOException) ioe.initCause(io1);
        else
          ioe = io1;
      }
      try {
        in.close();
View Full Code Here

      }
      try {
        in.close();
      } catch (IOException io1) {
        if (ioe != null)
          ioe = (IOException) ioe.initCause(io1);
        else
          ioe = io1;
      }
      if (ioe != null)
        throw ioe;
View Full Code Here

            String stackTrace = transfer.readString();
            JdbcSQLException s = new JdbcSQLException(message, sql, sqlstate, errorCode, null, stackTrace);
            if (errorCode == ErrorCode.CONNECTION_BROKEN_1) {
                // allow re-connect
                IOException e = new IOException(s.toString());
                e.initCause(s);
                throw e;
            }
            throw DbException.convert(s);
        } else if (status == STATUS_CLOSED) {
            transferList = null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.