Package java.io

Examples of java.io.IOException.initCause()


      //skip equals() test for now - most weights don't override equals() and we won't add this just for the tests.
      //TestCase.assertEquals("writeObject(w) != w.  ("+w+")",w2,w);  
     
    } catch (Exception e) {
      IOException e2 = new IOException("Serialization failed for "+w);
      e2.initCause(e);
      throw e2;
    }
  }

View Full Code Here


          // underlying input stream with a buffered one since
          // Bzip2CompressorInputStream uses the read() method exclusively.
          is = csFactory.createCompressorInputStream("bzip2", is);
        } catch (CompressorException e) {
          IOException ioe = new IOException(e.getMessage());
          ioe.initCause(e);
          throw ioe;
        }
        break;
      default: // Do nothing, stay with FileInputStream
    }
View Full Code Here

        public boolean readBoolean() throws java.io.IOException {
            try {
                return ((Boolean) dequeue()).booleanValue();
            } catch (ClassCastException ex) {
                IOException iox = new IOException(ex.getMessage());
                iox.initCause(ex);
                throw iox;
            }
        }

        public byte readByte() throws java.io.IOException {
View Full Code Here

        public byte readByte() throws java.io.IOException {
            try {
                return ((Byte) dequeue()).byteValue();
            } catch (ClassCastException ex) {
                IOException iox = new IOException(ex.getMessage());
                iox.initCause(ex);
                throw iox;
            }
        }

        public short readShort() throws java.io.IOException {
View Full Code Here

        public short readShort() throws java.io.IOException {
            try {
                return ((Short) dequeue()).shortValue();
            } catch (ClassCastException ex) {
                IOException iox = new IOException(ex.getMessage());
                iox.initCause(ex);
                throw iox;
            }
        }

        public char readChar() throws java.io.IOException {
View Full Code Here

        public char readChar() throws java.io.IOException {
            try {
                return ((Character) dequeue()).charValue();
            } catch (ClassCastException ex) {
                IOException iox = new IOException(ex.getMessage());
                iox.initCause(ex);
                throw iox;
            }
        }

        public int readInt() throws java.io.IOException {
View Full Code Here

        public int readInt() throws java.io.IOException {
            try {
                return ((Integer) dequeue()).intValue();
            } catch (ClassCastException ex) {
                IOException iox = new IOException(ex.getMessage());
                iox.initCause(ex);
                throw iox;
            }
        }

        public long readLong() throws java.io.IOException {
View Full Code Here

        public long readLong() throws java.io.IOException {
            try {
                return ((Long) dequeue()).longValue();
            } catch (ClassCastException ex) {
                IOException iox = new IOException(ex.getMessage());
                iox.initCause(ex);
                throw iox;
            }
        }

        public float readFloat() throws java.io.IOException {
View Full Code Here

        public float readFloat() throws java.io.IOException {
            try {
                return ((Float) dequeue()).floatValue();
            } catch (ClassCastException ex) {
                IOException iox = new IOException(ex.getMessage());
                iox.initCause(ex);
                throw iox;
            }
        }

        public double readDouble() throws java.io.IOException {
View Full Code Here

        public double readDouble() throws java.io.IOException {
            try {
                return ((Double) dequeue()).doubleValue();
            } catch (ClassCastException ex) {
                IOException iox = new IOException(ex.getMessage());
                iox.initCause(ex);
                throw iox;
            }
        }

        /** @deprecated */
 
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.