@Override public String toString() { return "ASObject[type=" + getType() + "," + super.toString() + "]"; } }
/** * Returns <tt>true</tt> if this map contains a mapping for the specified * key. <br> * * @param key * The key whose presence in this map is to be tested * @return <tt>true</tt> if this map contains a mapping for the specified * key. */ @Override public boolean containsKey(Object key) { return super.containsKey(toLowerCase(key)); }
protected ASObject readObject() throws IOException { ASObject aso = new ASObject(); return readObject(aso); }
log.info("Skipping NULL value for : %s", key); } else { aso.put(key, value); log.debug(" adding {key=%s, value=%s, type=%d}", key, value, type);
protected ASObject readObject() throws IOException { ASObject aso = new ASObject(); return readObject(aso); }
log.info("Skipping NULL value for : %s", key); } else { aso.put(key, value); log.debug(" adding {key=%s, value=%s, type=%d}", key, value, type);
/** * Returns <tt>true</tt> if this map contains a mapping for the specified * key. <br> * * @param key * The key whose presence in this map is to be tested * @return <tt>true</tt> if this map contains a mapping for the specified * key. */ @Override public boolean containsKey(Object key) { return super.containsKey(toLowerCase(key)); }
@Override public String toString() { return "ASObject[type=" + getType() + "," + super.toString() + "]"; } }
protected ASObject readObject() throws IOException { ASObject aso = new ASObject(); return readObject(aso); }
log.info("Skipping NULL value for : %s", key); } else { aso.put(key, value); log.debug(" adding {key=%s, value=%s, type=%d}", key, value, type);
/** * Returns <tt>true</tt> if this map contains a mapping for the specified * key. <br> * * @param key * The key whose presence in this map is to be tested * @return <tt>true</tt> if this map contains a mapping for the specified * key. */ @Override public boolean containsKey(Object key) { return super.containsKey(toLowerCase(key)); }
@Override public String toString() { return "ASObject[type=" + getType() + "," + super.toString() + "]"; } }
protected ASObject readObject() throws IOException { ASObject aso = new ASObject(); return readObject(aso); }
log.info("Skipping NULL value for : %s", key); } else { aso.put(key, value); log.debug(" adding {key=%s, value=%s, type=%d}", key, value, type);
/** * Removes the mapping for this key from this map if present. * * @param key * key whose mapping is to be removed from the map. * @return previous value associated with specified key, or <tt>null</tt> * if there was no mapping for key. A <tt>null</tt> return can * also indicate that the map previously associated <tt>null</tt> * with the specified key. */ @Override public Object remove(Object key) { return super.remove(toLowerCase(key)); }
@Override public String toString() { return "ASObject[type=" + getType() + "," + super.toString() + "]"; } }
/** * Reads custom class * * @return the read Object * @throws IOException */ protected Object readCustomClass() throws IOException { // Grab the explicit type - somehow it works String type = dataInputStream.readUTF(); log.debug("Reading Custom Class: %s", type); /* String mappedJavaClass = OpenAMFConfig.getInstance().getJavaClassName(type); if (mappedJavaClass != null) { type = mappedJavaClass; } */ ASObject aso = new ASObject(type); // The rest of the bytes are an object without the 0x03 header return readObject(aso); }
/** * Removes the mapping for this key from this map if present. * * @param key * key whose mapping is to be removed from the map. * @return previous value associated with specified key, or <tt>null</tt> * if there was no mapping for key. A <tt>null</tt> return can * also indicate that the map previously associated <tt>null</tt> * with the specified key. */ @Override public Object remove(Object key) { return super.remove(toLowerCase(key)); }
/** * Writes Object Map * * @param map * @throws IOException */ protected void writeMap(Map<?, ?> map) throws IOException { if (map instanceof ASObject && ((ASObject) map).getType() != null) { log.debug("Writing Custom Class: %s", ((ASObject) map).getType()); dataOutput.writeByte(AMF0Body.DATA_TYPE_CUSTOM_CLASS); dataOutput.writeUTF(((ASObject) map).getType()); } else { log.debug("Writing Map"); dataOutput.writeByte(AMF0Body.DATA_TYPE_MIXED_ARRAY); dataOutput.writeInt(0); } for (Iterator<?> entrys = map.entrySet().iterator(); entrys.hasNext();) { Map.Entry<?, ?> entry = (Map.Entry<?, ?>)entrys.next(); log.debug("%s: %s", entry.getKey(), entry.getValue()); dataOutput.writeUTF(entry.getKey().toString()); writeData(entry.getValue()); } dataOutput.writeShort(0); dataOutput.writeByte(AMF0Body.DATA_TYPE_OBJECT_END); }
/** * Reads custom class * * @return the read Object * @throws IOException */ protected Object readCustomClass() throws IOException { // Grab the explicit type - somehow it works String type = dataInput.readUTF(); log.debug("Reading Custom Class: %s", type); /* String mappedJavaClass = OpenAMFConfig.getInstance().getJavaClassName(type); if (mappedJavaClass != null) { type = mappedJavaClass; } */ ASObject aso = new ASObject(type); // The rest of the bytes are an object without the 0x03 header return readObject(aso); }