Package java.io

Examples of java.io.IOException.initCause()


                positionedStream.reposition (pos);
            }
        }
        catch (StandardException se) {
            IOException ioe = new IOException (se.getMessage());
            ioe.initCause (se);
            throw ioe;
        }
    }
}
View Full Code Here


                    this.in = in;
                    try {
                        this.positionedIn.resetStream();
                    } catch (StandardException se) {
                        IOException ioe = new IOException(se.getMessage());
                        ioe.initCause(se);
                        throw ioe;
                    }
                } else {
                    this.positionedIn = null;
                    // Buffer this for improved performance.
View Full Code Here

            parent.restoreContextStack();
        }
        } catch (SQLException sqle) {
            IOException ioe =
                new IOException(sqle.getSQLState() + ": " + sqle.getMessage());
            ioe.initCause(sqle);
            throw ioe;
        }
    }

    // this method came from java.io.DataInputStream
View Full Code Here

            if (e instanceof IOException)
                throw (IOException) e;
            if (e instanceof RuntimeException)
                throw (RuntimeException) e;
            IOException ioe = new IOException (e.getMessage());
            ioe.initCause (e);
            throw ioe;
        }
        isBytes = false;
        //now this call will write into the file
        if (len != 0)
View Full Code Here

            if (e instanceof IOException)
                throw (IOException) e;
            if (e instanceof RuntimeException)
                throw (RuntimeException) e;
            IOException ioe = new IOException(e.getMessage());
            ioe.initCause(e);
            throw ioe;
        }
    }
    /**
     * Invalidates all the variables and closes file handle if open.
View Full Code Here

            if ( isUserClob ) { characterReader.close(); }
        }
        catch (SQLException se)
        {
            IOException ioe = new IOException( se.getMessage() );
            ioe.initCause( se );

            throw ioe;
        }
    }
View Full Code Here

            materialized = true;
            try {
                stream = blob.getBinaryStream();
            } catch (SQLException ex) {
                IOException ioe = new IOException (ex.getMessage());
                ioe.initCause (ex);
                throw ioe;
            }
            long leftToSkip = pos;
            while (leftToSkip > 0) {
                long skipped = stream.skip (leftToSkip);
View Full Code Here

    public void write(char[] cbuf, int off, int len) throws IOException {
        try {
            contentHandler.characters(cbuf, off, len);
        } catch (SAXException ex) {
            IOException ioException = new IOException();
            ioException.initCause(ex);
            throw ioException;
        }
    }

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

      instantiatedSplit = (InputSplit)
        ReflectionUtils.newInstance(job.getClassByName(splitClass), job);
    } catch (ClassNotFoundException exp) {
      IOException wrap = new IOException("Split class " + splitClass +
                                         " not found");
      wrap.initCause(exp);
      throw wrap;
    }
    DataInputBuffer splitBuffer = new DataInputBuffer();
    splitBuffer.reset(split.get(), 0, split.getSize());
    instantiatedSplit.readFields(splitBuffer);
View Full Code Here

        }
      }
      catch(IOException cause) {
        IOException ioe = new IOException("Fail to rename tmp file (=" + tmp
            + ") to destination file (=" + dst + ")");
        ioe.initCause(cause);
        throw ioe;
      }
    }
   
    static String bytesString(long b) {
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.