Package java.io

Examples of java.io.DataOutputStream.writeFloat()


      {
        data.writeDouble(rs.getDouble(1));
        data.writeDouble(rs.getDouble(2));
        data.writeDouble(rs.getDouble(3));
        data.writeDouble(rs.getDouble(4));
        data.writeFloat(rs.getFloat(5));
      }
    }
    catch (SQLException e)
    {
      if (pg != null)
View Full Code Here


            // int
            out.writeInt(1);
            // long
            out.writeLong(1L);
            // float
            out.writeFloat(1.0f);
            // double
            out.writeDouble(1.0d);

            // String
            out.writeUTF("abc");
View Full Code Here

            // int
            dos.writeInt(1);
            // long
            dos.writeLong(1L);
            // float
            dos.writeFloat(1.0f);
            // double
            dos.writeDouble(1.0d);

            // String
            dos.writeUTF("abc");
View Full Code Here

            canon.writeDouble(v);
        }
        {
            float v = (float) rnd.nextDouble();
            test.writeFloat(v);
            canon.writeFloat(v);
        }

        // 27
        return new DataInputStream(new ByteArrayInputStream(bos.toByteArray()));
    }
View Full Code Here

        dos.writeLong(l);
        break;

      case FLOAT:
        float f = ((FloatObjectInspector) oi).get(o);
        dos.writeFloat(f);
        break;

      case DOUBLE:
        double d = ((DoubleObjectInspector) oi).get(o);
        dos.writeDouble(d);
View Full Code Here

    ByteArrayOutputStream byteOut = new ByteArrayOutputStream(4);
    DataOutputStream dataOut = new DataOutputStream(byteOut);
    byte bytes[] = new byte[4];
   
    try {
      dataOut.writeFloat(value);
      dataOut.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
    bytes = byteOut.toByteArray();
View Full Code Here

        dos.writeLong(l);
        break;

      case FLOAT:
        float f = ((FloatObjectInspector) oi).get(o);
        dos.writeFloat(f);
        break;

      case DOUBLE:
        double d = ((DoubleObjectInspector) oi).get(o);
        dos.writeDouble(d);
View Full Code Here

                    dout.writeByte(currentFontSizeIndex);

                    /*
                     * Save scrolling options
                     */
                    dout.writeFloat(speedMultiplier);
                    dout.writeBoolean(smoothScrolling);
                    dout.writeBoolean(horizontalScrolling);
                    dout.writeInt(currentHoldingTime);

                    /*
 
View Full Code Here

        dos.writeLong(l);
        break;

      case FLOAT:
        float f = ((FloatObjectInspector) oi).get(o);
        dos.writeFloat(f);
        break;

      case DOUBLE:
        double d = ((DoubleObjectInspector) oi).get(o);
        dos.writeDouble(d);
View Full Code Here

        mass = 0f;
        height = 0f;
      }
      dataMassStream.writeFloat(mass);
      dataMassStream.flush();
      dataHeightStream.writeFloat(height);
      dataHeightStream.flush();
    }

    byte[] bytes = Base64.encode(byteScanStream.toByteArray());
    hd.startElement("", "", PeakListElementName.SCAN_ID.getElementName(),
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.