Examples of readFloat()


Examples of java.io.DataInputStream.readFloat()

   * @return the version value of saved file
   * @throws Exception if it fails to read value
   */
  protected float readVersionFile(File file) throws Exception {
    DataInputStream dis = new DataInputStream(new FileInputStream(file));
    float version = dis.readFloat();
    dis.close();
    return version;
  }

  /**
 
View Full Code Here

Examples of java.io.DataInputStream.readFloat()

            } else {
                src = bytes;
            }
            DataInputStream stream =
                  new DataInputStream(new ByteArrayInputStream(src, offset, 4));
            return stream.readFloat();
        } catch (Exception ex) {
            throw new DescriptorException(ex);
        }
    }
View Full Code Here

Examples of java.io.ObjectInput.readFloat()

      type=(Integer) os.readObject();
     
      if(type.compareTo(BASICSTROKE)==0){
       
        /** retrieve the raw data from the BasicStroke */
        float w = os.readFloat();
        int current_line_cap_style = os.readInt();
        int current_line_join_style = os.readInt();
        float mitre_limit = os.readFloat();
        float[] current_line_dash_array = (float[]) os.readObject();
        float current_line_dash_phase = os.readFloat();
View Full Code Here

Examples of java.io.ObjectInputStream.readFloat()

        ObjectInputStream ois = new ObjectInputStream(inputStream);

        try {
      // read the quality and qualitySet from the stream
      paramList.setParameter("quality", ois.readFloat());
      paramList.setParameter("qualitySet", ois.readBoolean());
            sm = TileCodecUtils.deserializeSampleModel(ois.readObject());
      location = (Point)ois.readObject();
            data = (byte[]) ois.readObject();
        }
View Full Code Here

Examples of java.io.RandomAccessFile.readFloat()

        buf.writeFloat(100f);
        buf.writeFloat(-100f);
        buf.flush();

        file.seek(0);
        assertThat(file.readFloat(), is(100f));
        assertThat(file.readFloat(), is(-100f));

        eof(file);
    }
View Full Code Here

Examples of javax.imageio.stream.ImageInputStream.readFloat()

        i.seek(0);
        h.check(i.readChar() == '\u7270');
        i.seek(0);
        h.check(Double.compare(i.readDouble(), 1.709290273164385E243) == 0);
        i.seek(0);
        h.check(Float.compare(i.readFloat(), 4.7541126E30f) == 0);
        i.seek(0);
        h.check(i.readInt() == 1919944055);
        i.seek(0);
        h.check(i.readLong() == 8246096929276181351L);
        i.seek(0);
View Full Code Here

Examples of javax.imageio.stream.MemoryCacheImageInputStream.readFloat()

        i.seek(0);
        h.check(i.readChar() == '\u7270');
        i.seek(0);
        h.check(Double.compare(i.readDouble(), 1.709290273164385E243) == 0);
        i.seek(0);
        h.check(Float.compare(i.readFloat(), 4.7541126E30f) == 0);
        i.seek(0);
        h.check(i.readInt() == 1919944055);
        i.seek(0);
        h.check(i.readLong() == 8246096929276181351L);
        i.seek(0);
View Full Code Here

Examples of javax.jms.BytesMessage.readFloat()

      ProxyAssertSupport.assertEquals((byte)4, bytes[0]);
      ProxyAssertSupport.assertEquals((byte)5, bytes[1]);
      ProxyAssertSupport.assertEquals((byte)6, bytes[2]);
      ProxyAssertSupport.assertEquals((char)7, bm.readChar());
      ProxyAssertSupport.assertEquals(new Double(8.0), new Double(bm.readDouble()));
      ProxyAssertSupport.assertEquals(new Float(9.0), new Float(bm.readFloat()));
      ProxyAssertSupport.assertEquals(10, bm.readInt());
      ProxyAssertSupport.assertEquals(11l, bm.readLong());
      ProxyAssertSupport.assertEquals((short)12, bm.readShort());
      ProxyAssertSupport.assertEquals("this is an UTF String", bm.readUTF());
   }
View Full Code Here

Examples of javax.jms.StreamMessage.readFloat()

      assertTrue("Int == 314159", recv.readInt() == 314159);
      assertTrue("Long == 3141592653589793238L",
         recv.readLong() == 3141592653589793238L);
      assertTrue("Double == 3.1415926535897932384626433832795",
         recv.readDouble() == 3.1415926535897932384626433832795);
      assertTrue("Float == true", recv.readFloat() == 3.141f);
      assertTrue("Object == 31415926535897932384626433832795",
         recv.readObject().equals("31415926535897932384626433832795"));
      assertTrue("String == 31415926535897932384626433832795",
         recv.readString().equals("31415926535897932384626433832795"));
   }
View Full Code Here

Examples of javax.sql.rowset.serial.SQLInputImpl.readFloat()

     */
    public void testReadFloat() throws SQLException {
        Object[] attributes = new Object[] { Float.valueOf("3.5") };
        SQLInputImpl impl = new SQLInputImpl(attributes,
                new HashMap<String, Class<?>>());
        assertEquals((float) 3.5, impl.readFloat());

        try {
            impl.readFloat();
            fail("should throw SQLException");
        } catch (SQLException e) {
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.