Examples of writeFloat()


Examples of java.io.DataOutputStream.writeFloat()

            // Traverse each row and column value, transforming each entry.
            for (int row = 0; row < rows; ++row) {
                for (int col = 0; col < cols; ++col) {
                    double val = dis.readFloat();
                    dos.writeFloat((float) transform.transform(row, col, val));
                }
            }

            dos.close();
            return outFile;
View Full Code Here

Examples of java.io.ObjectOutput.writeFloat()

        os.writeObject(BASICSTROKE);
       
        BasicStroke stroke=(BasicStroke) items[i];
       
        /** write out the raw elements of the BasicStroke */
        os.writeFloat(stroke.getLineWidth());
        os.writeInt(stroke.getEndCap());
        os.writeInt(stroke.getLineJoin());
        os.writeFloat(stroke.getMiterLimit());
        os.writeObject(stroke.getDashArray());
        os.writeFloat(stroke.getDashPhase());
 
View Full Code Here

Examples of java.io.ObjectOutputStream.writeFloat()

  encoder.encode(ras) ;

  byte[] data = baos.toByteArray() ;

  ObjectOutputStream oos = new ObjectOutputStream(outputStream) ;
  oos.writeFloat(paramList.getFloatParameter("quality"));
  oos.writeBoolean(paramList.getBooleanParameter("qualitySet"));
  oos.writeObject(TileCodecUtils.serializeSampleModel(sm));

  Point location = new Point( ras.getMinX(), ras.getMinY() ) ;
  oos.writeObject( location ) ;
View Full Code Here

Examples of java.io.ObjectOutputStream.writeFloat()

   
    oos.useProtocolVersion(ObjectStreamConstants.PROTOCOL_VERSION_2);
   
    oos.writeInt(1);
    oos.writeShort((short) 7);
    oos.writeFloat(9.96601f);
    oos.writeLong(-900000000000001l);
    oos.writeShort((short) -1);
    oos.writeDouble(Math.PI);
    oos.writeByte((byte) 'z');
    oos.writeDouble(Double.NaN);
View Full Code Here

Examples of java.io.RandomAccessFile.writeFloat()

     * @throws Exception if failed
     */
    @Test
    public void testReadFloat() throws Exception {
        RandomAccessFile file = file();
        file.writeFloat(100f);
        file.writeFloat(-100f);
        file.seek(0);

        BufferedFileInput buf = manage(new BufferedFileInput(file, 256));
        assertThat(buf.readFloat(), is(100f));
View Full Code Here

Examples of java.io.RandomAccessFile.writeFloat()

     */
    @Test
    public void testReadFloat() throws Exception {
        RandomAccessFile file = file();
        file.writeFloat(100f);
        file.writeFloat(-100f);
        file.seek(0);

        BufferedFileInput buf = manage(new BufferedFileInput(file, 256));
        assertThat(buf.readFloat(), is(100f));
        assertThat(buf.readFloat(), is(-100f));
View Full Code Here

Examples of java.io.RandomAccessFile.writeFloat()

     * @tests java.io.RandomAccessFile#readFloat()
     */
    public void test_readFloat() throws IOException {
        // Test for method float java.io.RandomAccessFile.readFloat()
        RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
        raf.writeFloat(Float.MAX_VALUE);
        raf.seek(0);
        assertEquals("Incorrect float read/written", Float.MAX_VALUE, raf
                .readFloat(), 0);
        raf.close();
    }
View Full Code Here

Examples of javax.imageio.stream.ImageOutputStream.writeFloat()

                    if (pos + 4 > length) {
                        ios.reset();
                        ios.mark();
                        pos = 0;
                    }
                    ios.writeFloat(0.0f);
                    pos += 4;
                } while (--numReps >= 0);
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
View Full Code Here

Examples of javax.jms.BytesMessage.writeFloat()

      sent.writeChar('c');
      sent.writeShort((short) 31415);
      sent.writeInt(314159);
      sent.writeLong(3141592653589793238L);
      sent.writeDouble(3.1415926535897932384626433832795);
      sent.writeFloat(3.141f);
      sent.writeObject("31415926535897932384626433832795");
      sent.writeUTF("31415926535897932384626433832795");

      BytesMessage recv = (BytesMessage) sendRecMsg(sent);
      log.debug("recv: "+recv);
View Full Code Here

Examples of javax.jms.BytesMessage.writeFloat()

      bm.writeBoolean(true);
      bm.writeByte((byte)3);
      bm.writeBytes(new byte[] { (byte)4, (byte)5, (byte)6 });
      bm.writeChar((char)7);
      bm.writeDouble(8.0);
      bm.writeFloat(9.0f);
      bm.writeInt(10);
      bm.writeLong(11l);
      bm.writeShort((short)12);
      bm.writeUTF("this is an UTF String");
      bm.reset();
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.