Tabnine Logo
AMF3Deserializer.readAMF3Integer
Code IndexAdd Tabnine to your IDE (free)

How to use
readAMF3Integer
method
in
org.granite.messaging.amf.io.AMF3Deserializer

Best Java code snippets using org.granite.messaging.amf.io.AMF3Deserializer.readAMF3Integer (Showing top 15 results out of 315)

origin: org.graniteds/granite-client

protected Object readAMF3VectorObject() throws IOException {
  Object result = null;
  int type = readAMF3Integer();
  if ((type & 0x01) == 0) // stored vector.
    result = getFromStoredObjects(type >> 1);
  else {
    final int length = type >> 1;
    List<Object> vector = new ArrayList<Object>(length);
    
    addToStoredObjects(result);
    
    readAMF3Integer(); // always 0x00?
    readAMF3Integer(); // always 0x01?
    
    for (int i = 0; i < length; i++)
      vector.add(readObject());
    
    result = vector;
  }
  
  if (debugMore) logMore.debug("readAMF3VectorObject() -> %s", result);
  return result;
}
origin: org.graniteds/granite-client

protected Object readAMF3VectorInt() throws IOException {
  Object result = null;
  int type = readAMF3Integer();
  if ((type & 0x01) == 0) // stored vector.
    result = getFromStoredObjects(type >> 1);
  else {
    final int length = type >> 1;
    List<Integer> vector = new ArrayList<Integer>(length);
    
    addToStoredObjects(result);
    
    readAMF3Integer(); // always 0x00?
    
    for (int i = 0; i < length; i++)
      vector.add(readInt());
    
    result = vector;
  }
  
  if (debugMore) logMore.debug("readAMF3VectorInt() -> %s", result);
  return result;
}
origin: org.graniteds/granite-client

protected Object readAMF3VectorNumber() throws IOException {
  Object result = null;
  int type = readAMF3Integer();
  if ((type & 0x01) == 0) // stored vector.
    result = getFromStoredObjects(type >> 1);
  else {
    final int length = type >> 1;
    List<Double> vector = new ArrayList<Double>(length);
    
    addToStoredObjects(result);
    
    readAMF3Integer(); // always 0x00?
    
    for (int i = 0; i < length; i++)
      vector.add(readDouble());
    
    result = vector;
  }
  
  if (debugMore) logMore.debug("readAMF3VectorDouble() -> %s", result);
  return result;
}
origin: org.graniteds/granite-client

protected Object readAMF3VectorUInt() throws IOException {
  Object result = null;
  int type = readAMF3Integer();
  if ((type & 0x01) == 0) // stored vector.
    result = getFromStoredObjects(type >> 1);
  else {
    final int length = type >> 1;
    List<Long> vector = new ArrayList<Long>(length);
    
    addToStoredObjects(result);
    
    readAMF3Integer(); // always 0x00?
    
    for (int i = 0; i < length; i++)
      vector.add(readInt() & 0xffffffffL);
    
    result = vector;
  }
  
  if (debugMore) logMore.debug("readAMF3VectorUInt() -> %s", result);
  return result;
}
origin: org.graniteds/granite-client

protected Date readAMF3Date() throws IOException {
  Date result = null;
  int type = readAMF3Integer();
  if ((type & 0x01) == 0) // stored Date
    result = (Date)getFromStoredObjects(type >> 1);
  else {
    result = new Date((long)readDouble());
    addToStoredObjects(result);
  }
  if (debugMore) logMore.debug("readAMF3Date() -> %s", result);
  return result;
}
origin: org.graniteds/granite-client

public Object readObject() throws IOException {
  if (debugMore) logMore.debug("readObject()...");
  try {
    int type = readAMF3Integer();
    return readObject(type);
  }
  catch (IOException e) {
    throw e;
  }
  catch (Exception e) {
    throw new AMF3SerializationException(e);
  }
}
origin: org.graniteds/granite-client

protected String readAMF3XmlString() throws IOException {
  String result = null;
  int type = readAMF3Integer();
  if ((type & 0x01) == 0) // stored object
    result = (String)getFromStoredObjects(type >> 1);
  else {
    byte[] bytes = readBytes(type >> 1);
    result = new String(bytes, "UTF-8");
    addToStoredObjects(result);
  }
  if (debugMore) logMore.debug("readAMF3XmlString() -> %s", result);
  return result;
}
origin: org.graniteds/granite-client

protected byte[] readAMF3ByteArray() throws IOException {
  byte[] result = null;
  int type = readAMF3Integer();
  if ((type & 0x01) == 0) // stored object.
    result = (byte[])getFromStoredObjects(type >> 1);
  else {
    result = readBytes(type >> 1);
    addToStoredObjects(result);
  }
  if (debugMore) logMore.debug("readAMF3ByteArray() -> %s", result);
  return result;
}
origin: org.graniteds/granite-client

protected Object readAMF3Array() throws IOException {
  Object result = null;
  int type = readAMF3Integer();
  if ((type & 0x01) == 0) // stored array.
    result = getFromStoredObjects(type >> 1);
  else {
    final int size = type >> 1;
    String key = readAMF3String();
    if (key.length() == 0) {
      Object[] objects = new Object[size];
      addToStoredObjects(objects);
      for (int i = 0; i < size; i++)
        objects[i] = readObject();
      result = objects;
    }
    else {
      Map<Object, Object> map = new HashMap<Object, Object>();
      addToStoredObjects(map);
      while(key.length() > 0) {
        map.put(key, readObject());
        key = readAMF3String();
      }
      for (int i = 0; i < size; i++)
        map.put(Integer.valueOf(i), readObject());
      result = map;
    }
  }
  if (debugMore) logMore.debug("readAMF3Array() -> %s", result);
  return result;
}
origin: org.graniteds/granite-client

int type = readAMF3Integer();
if ((type & 0x01) == 0) // stored string
  result = getFromStoredStrings(type >> 1);
origin: org.graniteds/granite-client-java

  return Boolean.TRUE;
case AMF3_INTEGER: // 0x04;
  return Integer.valueOf(readAMF3Integer());
case AMF3_NUMBER: // 0x05;
  return readAMF3Double();
origin: org.graniteds/granite-client

  return Boolean.TRUE;
case AMF3_INTEGER: // 0x04;
  return Integer.valueOf(readAMF3Integer());
case AMF3_NUMBER: // 0x05;
  return readAMF3Double();
origin: org.graniteds/granite-client-javafx

  return Boolean.TRUE;
case AMF3_INTEGER: // 0x04;
  return Integer.valueOf(readAMF3Integer());
case AMF3_NUMBER: // 0x05;
  return readAMF3Double();
origin: org.graniteds/granite-server

  return Boolean.TRUE;
case AMF3_INTEGER: // 0x04;
  return Integer.valueOf(readAMF3Integer());
case AMF3_NUMBER: // 0x05;
  return readAMF3Double();
origin: org.graniteds/granite-client

int type = readAMF3Integer();
if (debug) log.debug("readAMF3Object() - type=0x%02X", type);
org.granite.messaging.amf.ioAMF3DeserializerreadAMF3Integer

Popular methods of AMF3Deserializer

  • <init>
  • readObject
  • close
  • readAMF3Array
  • readAMF3ByteArray
  • readAMF3Date
  • readAMF3Double
  • readAMF3Object
  • readAMF3String
  • readAMF3VectorInt
  • readAMF3VectorNumber
  • readAMF3VectorObject
  • readAMF3VectorNumber,
  • readAMF3VectorObject,
  • readAMF3Xml,
  • readAMF3XmlString,
  • readByte,
  • readDouble,
  • readFully,
  • readInt,
  • readUnsignedByte

Popular in Java

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • getResourceAsStream (ClassLoader)
  • getSupportFragmentManager (FragmentActivity)
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • JList (javax.swing)
  • JPanel (javax.swing)
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now