Examples of ByteArraySerializer


Examples of org.apache.qpid.management.wsdm.muse.serializer.ByteArraySerializer

  @Override
  protected Object deserialize(Element xml, Class theClass) throws SoapFault
  {
       if (theClass == byte[].class)
       {
         return new ByteArraySerializer().fromXML(xml);
       } else
       {
         return super.deserialize(xml, theClass);
       }
  }
View Full Code Here

Examples of org.apache.xmlrpc.serializer.ByteArraySerializer

                    }
                });
            }
            return dateSerializer;
      } else if (pObject instanceof byte[]) {
      return new ByteArraySerializer();
    } else if (pObject instanceof Object[]) {
      return new ObjectArraySerializer(this, pConfig);
    } else if (pObject instanceof List) {
      return new ListSerializer(this, pConfig);
    } else if (pObject instanceof Map) {
View Full Code Here

Examples of org.apache.xmlrpc.serializer.ByteArraySerializer

                    }
                });
            }
            return dateSerializer;
      } else if (pObject instanceof byte[]) {
      return new ByteArraySerializer();
    } else if (pObject instanceof Object[]) {
      return new ObjectArraySerializer(this, pConfig);
    } else if (pObject instanceof List) {
      return new ListSerializer(this, pConfig);
    } else if (pObject instanceof Map) {
View Full Code Here

Examples of org.apache.xmlrpc.serializer.ByteArraySerializer

    } else if (pObject instanceof Double) {
      return DOUBLE_SERIALIZER;
    } else if (pObject instanceof Date) {
      return DATE_SERIALIZER;
    } else if (pObject instanceof byte[]) {
      return new ByteArraySerializer();
    } else if (pObject instanceof Object[]) {
      return new ObjectArraySerializer(this, pConfig);
    } else if (pObject instanceof List) {
      return new ListSerializer(this, pConfig);
    } else if (pObject instanceof Map) {
View Full Code Here

Examples of org.tmatesoft.hg.internal.DataSerializer.ByteArraySerializer

      Nodeid fileRev = null;
      final boolean isNewFile = !df.exists();
      if (fp.first() != NO_REVISION && fp.second() == NO_REVISION && !isNewFile) {
        // compare file contents to see if anything has changed, and reuse old revision, if unchanged.
        // XXX ineffective, need better access to revision conten
        ByteArraySerializer bas = new ByteArraySerializer();
        bds.serialize(bas);
        final byte[] newContent = bas.toByteArray();
        // unless there's a way to reset DataSource, replace it with the content just read
        bds = new DataSerializer.ByteArrayDataSource(newContent);
        if (new ComparatorChannel(newContent).same(df, fp.first())) {
          fileRev = df.getRevision(fp.first());
        }
View Full Code Here

Examples of org.tmatesoft.hg.internal.DataSerializer.ByteArraySerializer

    }
    return lastEntryRevision;
  }
 
  private byte[] toByteArray(DataSource content) throws HgIOException, HgRuntimeException {
    ByteArraySerializer ba = new ByteArraySerializer();
    content.serialize(ba);
    return ba.toByteArray();
  }
View Full Code Here

Examples of pivot.serialization.ByteArraySerializer

    @Test(timeout = 2000)
    public void readValues() throws IOException, SerializationException {
        log("readValues()");

        Serializer<byte[]> serializer = new ByteArraySerializer();

        ByteArrayInputStream inputStream = new ByteArrayInputStream(testBytes);
        byte[] result = serializer.readObject(inputStream);
        assertNotNull(result);

        // dump content, but useful only for text resources ...
        String dump = new String(result);
        int dumpLength = dump.getBytes().length;
View Full Code Here

Examples of pivot.serialization.ByteArraySerializer

    @Test(timeout = 2000)
    public void writeValues() throws IOException, SerializationException {
        log("writeValues()");

        Serializer<byte[]> serializer = new ByteArraySerializer();

        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        serializer.writeObject(testBytes, outputStream);

        outputStream.flush();
        outputStream.close();

        byte[] result = outputStream.toByteArray();
View Full Code Here

Examples of voldemort.serialization.ByteArraySerializer

            StorageService ss = (StorageService) vsrv;
            voldemortServers.put(nodeId, vs);

            slopStorageEngines.put(nodeId, ss.getStoreRepository().getSlopStore());
            slopStores.put(nodeId, SerializingStore.wrap(ss.getStoreRepository().getSlopStore(),
                                                         new ByteArraySerializer(),
                                                         new SlopSerializer(),
                                                         new IdentitySerializer()));
            // wrap original store with force fail store
            Store<ByteArray, byte[], byte[]> store = ss.getStoreRepository()
                                                       .removeLocalStore(STORE_NAME);
            UnreachableStoreException exception = new UnreachableStoreException("Force failed");
            ForceFailStore<ByteArray, byte[], byte[]> forceFailStore = new ForceFailStore<ByteArray, byte[], byte[]>(store,
                                                                                                                     exception);
            forceFailStores.put(nodeId, forceFailStore);
            ss.getStoreRepository().addLocalStore(forceFailStore);
        }

        strategy = new RoutingStrategyFactory().updateRoutingStrategy(storeDef, cluster);

        // create client socket stores and slop stores
        SocketStoreClientFactoryForTest clientSocketStoreFactory = new SocketStoreClientFactoryForTest(STORE_NAME,
                                                                                                       SLOP_STORE_NAME);
        Serializer<ByteArray> slopKeySerializer = new ByteArraySerializer();
        Serializer<Slop> slopValueSerializer = new SlopSerializer();
        Map<Integer, Store<ByteArray, byte[], byte[]>> testStores = subStores;
        Map<Integer, Store<ByteArray, Slop, byte[]>> slopStores = new HashMap<Integer, Store<ByteArray, Slop, byte[]>>();
        for(Node node: cluster.getNodes()) {
            // test store
View Full Code Here

Examples of voldemort.serialization.ByteArraySerializer

        slopStats.setAll(SlopStats.Tracked.OUTSTANDING, newValues);
    }

    public StorageEngine<ByteArray, Slop, byte[]> asSlopStore() {
        return SerializingStorageEngine.wrap(this,
                                             new ByteArraySerializer(),
                                             slopSerializer,
                                             new IdentitySerializer());
    }
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.