protected Date readDate() throws IOException { ClassUtil.validateCreation(Date.class); long time = (long)in.readDouble(); /* We read in the timezone but do nothing with the value as we expect dates to be written in the UTC timezone. Client and servers are responsible for applying their own timezones. */ in.readShort(); Date d = new Date(time); if (isDebug) trace.write(d.toString()); return d; }
protected Date readDate() throws IOException { ClassUtil.validateCreation(Date.class); long time = (long)in.readDouble(); /* We read in the timezone but do nothing with the value as we expect dates to be written in the UTC timezone. Client and servers are responsible for applying their own timezones. */ in.readShort(); Date d = new Date(time); if (isDebug) trace.write(d.toString()); return d; }
/** * Start process of the Action Script type True. * * @param attributes current Attributes */ public void start_true(Attributes attributes) { ClassUtil.validateCreation(Boolean.class); setValue(Boolean.TRUE); if (isDebug) trace.write(true); }
protected String readString() throws IOException { ClassUtil.validateCreation(String.class); String s = readUTF(); if (isDebug) trace.writeString(s); return s; }
/** * Start process of the Action Script type True. * * @param attributes current Attributes */ public void start_true(Attributes attributes) { ClassUtil.validateCreation(Boolean.class); setValue(Boolean.TRUE); if (isDebug) trace.write(true); }
/** * Start process of the Action Script type False. * * @param attributes current Attributes */ public void start_false(Attributes attributes) { ClassUtil.validateCreation(Boolean.class); setValue(Boolean.FALSE); if (isDebug) trace.write(false); }
/** {@inheritDoc} */ @Override public boolean readBoolean() throws IOException { ClassUtil.validateCreation(Boolean.class); boolean b = super.readBoolean(); if (isDebug) trace.write(b); return b; }
/** {@inheritDoc} */ @Override public double readDouble() throws IOException { ClassUtil.validateCreation(Double.class); double d = super.readDouble(); if (isDebug) trace.write(d); return d; }
/** {@inheritDoc} */ @Override public double readDouble() throws IOException { ClassUtil.validateCreation(Double.class); double d = super.readDouble(); if (isDebug) trace.write(d); return d; }
/** * Start process of the Action Script type False. * * @param attributes current Attributes */ public void start_false(Attributes attributes) { ClassUtil.validateCreation(Boolean.class); setValue(Boolean.FALSE); if (isDebug) trace.write(false); }
/** {@inheritDoc} */ @Override public boolean readBoolean() throws IOException { ClassUtil.validateCreation(Boolean.class); boolean b = super.readBoolean(); if (isDebug) trace.write(b); return b; }
protected String readString() throws IOException { ClassUtil.validateCreation(String.class); String s = readUTF(); if (isDebug) trace.writeString(s); return s; }
/** {@inheritDoc} */ @Override public double readDouble() throws IOException { ClassUtil.validateCreation(Double.class); double d = super.readDouble(); if (isDebug) trace.write(d); return d; }
/** {@inheritDoc} */ @Override public double readDouble() throws IOException { ClassUtil.validateCreation(Double.class); double d = super.readDouble(); if (isDebug) trace.write(d); return d; }
/** * Deserialize the bits of a date-time value w/o a prefixing type byte. */ protected Date readDate() throws IOException { ClassUtil.validateCreation(Date.class); int ref = readUInt29(); if ((ref & 1) == 0) // This is a reference return (Date)getObjectReference(ref >> 1); long time = (long)in.readDouble(); Date d = new Date(time); objectTable.add(d); //Remember Date if (isDebug) trace.write(d); return d; }
/** * End process of the Action Script type Int. * */ public void end_int() { ClassUtil.validateCreation(Integer.class); String is = text.toString().trim(); try { Integer i = Integer.valueOf(is); setValue(i); if (isDebug) trace.write(i.intValue()); } catch (NumberFormatException ex) { throw new MessageException("Invalid int: " + is); } }
/** * Deserialize the bits of a date-time value w/o a prefixing type byte. */ protected Date readDate() throws IOException { ClassUtil.validateCreation(Date.class); int ref = readUInt29(); if ((ref & 1) == 0) // This is a reference return (Date)getObjectReference(ref >> 1); long time = (long)in.readDouble(); Date d = new Date(time); objectTable.add(d); //Remember Date if (isDebug) trace.write(d); return d; }
/** * End process of the Action Script type Int. * */ public void end_int() { ClassUtil.validateCreation(Integer.class); String is = text.toString().trim(); try { Integer i = Integer.valueOf(is); setValue(i); if (isDebug) trace.write(i.intValue()); } catch (NumberFormatException ex) { throw new MessageException("Invalid int: " + is); } }
/** * End process of the Action Script type ByteArray. * */ public void end_bytearray() { ClassUtil.validateCreation(byte[].class); String bs = text.toString().trim(); Hex.Decoder decoder = new Hex.Decoder(); decoder.decode(bs); byte[] value = decoder.drain(); setValue(value); if (isDebug) trace.startByteArray(objectTable.size() - 1, bs.length()); }
/** * End process of the Action Script type ByteArray. * */ public void end_bytearray() { ClassUtil.validateCreation(byte[].class); String bs = text.toString().trim(); Hex.Decoder decoder = new Hex.Decoder(); decoder.decode(bs); byte[] value = decoder.drain(); setValue(value); if (isDebug) trace.startByteArray(objectTable.size() - 1, bs.length()); }