Package java.io

Examples of java.io.ObjectInput.readInt()


                    String uri = readString(input);
                    handler.evNamespace(prefix, uri);
                    break;
                }
                case XQEventEncoder.EV_TEXT: {
                    final int length = input.readInt();
                    final char[] ch = new char[length];
                    for(int i = 0; i < length; i++) {
                        ch[i] = input.readChar();
                    }
                    handler.evText(ch, 0, length);
View Full Code Here


                    }
                    handler.evText(ch, 0, length);
                    break;
                }
                case XQEventEncoder.EV_CDATA: {
                    final int length = input.readInt();
                    final char[] ch = new char[length];
                    for(int i = 0; i < length; i++) {
                        ch[i] = input.readChar();
                    }
                    handler.evCData(ch, 0, length);
View Full Code Here

                    }
                    handler.evCData(ch, 0, length);
                    break;
                }
                case XQEventEncoder.EV_COMMENT: {
                    final int length = input.readInt();
                    final char[] ch = new char[length];
                    for(int i = 0; i < length; i++) {
                        ch[i] = input.readChar();
                    }
                    handler.evComment(ch, 0, length);
View Full Code Here

                }
                case XQEventEncoder.EV_NODE_START:
                    final XQNode node = decodeNode(input, handler, _serContext);
                    return node;
                case XQEventEncoder.EV_TEXT: {
                    final int length = input.readInt();
                    final char[] ch = new char[length];
                    for(int i = 0; i < length; i++) {
                        ch[i] = input.readChar();
                    }
                    handler.evText(ch, 0, length);
View Full Code Here

                case XQEventEncoder.EV_NAMESPACE:
                    redirectString(input, out);
                    redirectString(input, out);
                    break;
                case XQEventEncoder.EV_TEXT: {
                    final int length = input.readInt();
                    out.writeInt(length);
                    for(int i = 0; i < length; i++) {
                        char c = input.readChar();
                        out.writeChar(c);
                    }
View Full Code Here

                        out.writeChar(c);
                    }
                    break;
                }
                case XQEventEncoder.EV_CDATA: {
                    final int length = input.readInt();
                    out.writeInt(length);
                    for(int i = 0; i < length; i++) {
                        char c = input.readChar();
                        out.writeChar(c);
                    }
View Full Code Here

                        out.writeChar(c);
                    }
                    break;
                }
                case XQEventEncoder.EV_COMMENT: {
                    final int length = input.readInt();
                    out.writeInt(length);
                    for(int i = 0; i < length; i++) {
                        char c = input.readChar();
                        out.writeChar(c);
                    }
View Full Code Here

   
    public MessageContext getContext(InputStream is) {
        MessageContext ctx = new GenericMessageContext();
        try {
            ObjectInput oi = new ObjectInputStream(is);
            int nKeys = oi.readInt();
           
            for (int i = 0; i < nKeys; i++) {
                String key = (String)oi.readObject();
                Object value = oi.readObject();
                ctx.put(key, value);
View Full Code Here

      }

      ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
      ObjectInput oi = marshaller.startObjectInput(in, false);
      try {
         assert oi.readInt() == 1 : "we have 3 different buckets";
         assert oi.readObject().equals(fcs.getLockFromKey("k1") + "");
         assert oi.readInt() > 0; //size on disk
      } finally {
         marshaller.finishObjectInput(oi);
      }
View Full Code Here

      ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
      ObjectInput oi = marshaller.startObjectInput(in, false);
      try {
         assert oi.readInt() == 1 : "we have 3 different buckets";
         assert oi.readObject().equals(fcs.getLockFromKey("k1") + "");
         assert oi.readInt() > 0; //size on disk
      } finally {
         marshaller.finishObjectInput(oi);
      }
   }
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.