Examples of writeFloat()


Examples of com.alibaba.dubbo.common.serialize.ObjectOutput.writeFloat()

    }

    @Test
    public void test_Float() throws Exception {
        ObjectOutput objectOutput = serialization.serialize(url, byteArrayOutputStream);
        objectOutput.writeFloat(1.28F);
        objectOutput.flushBuffer();

        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(
                byteArrayOutputStream.toByteArray());
        ObjectInput deserialize = serialization.deserialize(url, byteArrayInputStream);
View Full Code Here

Examples of com.envoisolutions.sxc.util.XoXMLStreamWriter.writeFloat()

                } else if (c == Byte.class) {
                    w.writeByte((Byte) o);
                } else if (c == Double.class) {
                    w.writeDouble((Double) o);
                } else if (c == Float.class) {
                    w.writeFloat((Float) o);
                } else if (c == Long.class) {
                    w.writeLong((Long) o);
                } else if (c == Integer.class) {
                    w.writeInt((Integer) o);
                } else if (c == Short.class) {
View Full Code Here

Examples of com.envoisolutions.sxc.util.XoXMLStreamWriterImpl.writeFloat()

                } else if (c == Byte.class) {
                    w.writeByte((Byte) o);
                } else if (c == Double.class) {
                    w.writeDouble((Double) o);
                } else if (c == Float.class) {
                    w.writeFloat((Float) o);
                } else if (c == Long.class) {
                    w.writeLong((Long) o);
                } else if (c == Integer.class) {
                    w.writeInt((Integer) o);
                } else if (c == Short.class) {
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeFloat()

      } else if (t instanceof Integer) {
         out.writeInt32(wrappedInt32, (Integer) t);
      } else if (t instanceof Double) {
         out.writeDouble(wrappedDouble, (Double) t);
      } else if (t instanceof Float) {
         out.writeFloat(wrappedFloat, (Float) t);
      } else if (t instanceof Boolean) {
         out.writeBool(wrappedBool, (Boolean) t);
      } else if (t instanceof byte[]) {
         byte[] bytes = (byte[]) t;
         out.writeTag(wrappedBytes, WireFormat.WIRETYPE_LENGTH_DELIMITED);
View Full Code Here

Examples of com.higherfrequencytrading.chronicle.Excerpt.writeFloat()

                    for (long i = 1; i <= runs; i += batchSize) {
                        excerpt.startExcerpt(13 * batchSize);
                        for (int k = 0; k < batchSize; k++) {
                            excerpt.writeUnsignedByte('M'); // message type
                            excerpt.writeLong(i); // e.g. time stamp
                            excerpt.writeFloat(i);
                        }
                        excerpt.finish();
                    }
                    ic.close();
                } catch (IOException e) {
View Full Code Here

Examples of com.peterhi.obsolete.Stream.writeFloat()

    try {
      Stream stream = new Stream();
      stream.writeBit(1);
     
      for (float sample : sampleFloats()) {
        stream.writeFloat(sample);
      }
     
      stream.writeBit(1);
     
      stream.readBit();
View Full Code Here

Examples of htsjdk.tribble.util.LittleEndianOutputStream.writeFloat()

    static void createTestFile() throws IOException {

        LittleEndianOutputStream los = new LittleEndianOutputStream(new BufferedOutputStream(new FileOutputStream("les_test.bin")));

        los.writeString("Binary test file");
        los.writeFloat(Float.MAX_VALUE);
        los.writeByte(Byte.MAX_VALUE);
        los.writeShort(Short.MAX_VALUE);
        los.writeInt(Integer.MAX_VALUE);
        los.writeLong(Long.MAX_VALUE);
        los.writeDouble(Double.MAX_VALUE);
View Full Code Here

Examples of io.netty.buffer.ByteBuf.writeFloat()

    ByteBuf buffer = Unpooled.buffer();
    VanillaByteBufUtils.writeString(buffer, message.getSoundName());
    buffer.writeInt((int) (message.getX() * 8.0f));
    buffer.writeInt((int) (message.getY() * 8.0f));
    buffer.writeInt((int) (message.getZ() * 8.0f));
    buffer.writeFloat(message.getVolume());
    buffer.writeByte((byte) (message.getPitch() * 63f));
    return buffer;
  }
}
View Full Code Here

Examples of java.io.DataOutput.writeFloat()

            } else {
                dos = new LEDataOutputStream(stream);
            }

            for (int i = 0; i < array.length; i++) {
                dos.writeFloat(array[i]);
            }

            stream.close();
        } catch (IOException e) {
            throw new IllegalArgumentException("InputStream is unwritable : "
View Full Code Here

Examples of java.io.DataOutputStream.writeFloat()

   * @param version the version of the applet as a float
   * @throws Exception if it fails to write file
   */
  protected void writeVersionFile(File file, float version) throws Exception {
    DataOutputStream dos = new DataOutputStream(new FileOutputStream(file));
    dos.writeFloat(version);
    dos.close();
  }

  /**
   * read the current cache file
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.