Examples of writeExternal()


Examples of com.google.i18n.phonenumbers.Phonemetadata.PhoneMetadataCollection.writeExternal()

        }
        PhoneMetadataCollection outMetadataCollection = new PhoneMetadataCollection();
        outMetadataCollection.addMetadata(metadata);
        FileOutputStream outputForRegion = new FileOutputStream(filePrefix + "_" + regionCode);
        ObjectOutputStream out = new ObjectOutputStream(outputForRegion);
        outMetadataCollection.writeExternal(out);
        out.close();
      }

      Map<Integer, List<String>> countryCodeToRegionCodeMap =
          BuildMetadataFromXml.buildCountryCodeToRegionCodeMap(metadataCollection);
View Full Code Here

Examples of com.google.i18n.phonenumbers.prefixmapper.MappingFileProvider.writeExternal()

  static void outputBinaryConfiguration(SortedMap<Integer, Set<String>> availableDataFiles,
                                        OutputStream outputStream) throws IOException {
    MappingFileProvider mappingFileProvider = new MappingFileProvider();
    mappingFileProvider.readFileConfigs(availableDataFiles);
    ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
    mappingFileProvider.writeExternal(objectOutputStream);
    objectOutputStream.flush();
  }

  /**
   * Splits the provided phone prefix map into multiple maps according to the provided list of
View Full Code Here

Examples of com.google.i18n.phonenumbers.prefixmapper.PhonePrefixMap.writeExternal()

      throws IOException {
    // Build the corresponding phone prefix map and serialize it to the binary format.
    PhonePrefixMap phonePrefixMap = new PhonePrefixMap();
    phonePrefixMap.readPhonePrefixMap(sortedMap);
    ObjectOutputStream objectOutputStream = new ObjectOutputStream(output);
    phonePrefixMap.writeExternal(objectOutputStream);
    objectOutputStream.flush();
  }

  /**
   * Reads the mappings contained in the provided input stream pointing to a text file.
View Full Code Here

Examples of com.google.i18n.phonenumbers.prefixmapper.PrefixTimeZonesMap.writeExternal()

      throws IOException {
    // Build the corresponding PrefixTimeZonesMap and serialize it to the binary format.
    PrefixTimeZonesMap prefixTimeZonesMap = new PrefixTimeZonesMap();
    prefixTimeZonesMap.readPrefixTimeZonesMap(sortedMap);
    ObjectOutputStream objectOutputStream = new ObjectOutputStream(output);
    prefixTimeZonesMap.writeExternal(objectOutputStream);
    objectOutputStream.flush();
  }

  /**
   * Runs the prefix to time zones map data generator.
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialDirectoryEntry.writeExternal()

      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      HyperBoundingBox hb = new HyperBoundingBox(new double[exampleLeaf.getDimensionality()], new double[exampleLeaf.getDimensionality()]);
      SpatialDirectoryEntry sl = new SpatialDirectoryEntry(0, hb);
      while(baos.size() <= getPageSize()) {
        sl.writeExternal(oos);
        oos.flush();
        cap++;
      }
      dirCapacity = cap - 1;
    }
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.index.tree.spatial.SpatialPointLeafEntry.writeExternal()

      int cap = 0;
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ObjectOutputStream oos = new ObjectOutputStream(baos);
      SpatialPointLeafEntry sl = new SpatialPointLeafEntry(DBIDUtil.importInteger(0), new double[exampleLeaf.getDimensionality()]);
      while(baos.size() <= getPageSize()) {
        sl.writeExternal(oos);
        oos.flush();
        cap++;
      }
      // the last one caused the page to overflow.
      leafCapacity = cap - 1;
View Full Code Here

Examples of java.awt.datatransfer.DataFlavor.writeExternal()

  {
    DataFlavor f = new DataFlavor("application/text; param1=xyz",
                                  "Plain Text");
    try
      {
        f.writeExternal(output);
      }
    catch (IOException ex)
      {
        fail();
      }
View Full Code Here

Examples of java.io.Externalizable.writeExternal()

    else if (obj instanceof Externalizable && (!Proxy.isProxyClass(cls)))
    {
      Externalizable extObj = (Externalizable)obj;
      try
      {
        extObj.writeExternal(new ObjectOutputAdaptor()
        {
          private int count = 0;

          @Override
          public void writeObject(Object streamObj) throws IOException
View Full Code Here

Examples of java.io.Externalizable.writeExternal()

    else if (obj instanceof Externalizable && (!Proxy.isProxyClass(cls)))
    {
      Externalizable extObj = (Externalizable)obj;
      try
      {
        extObj.writeExternal(new ObjectOutputAdaptor()
        {
          private int count = 0;

          @Override
          public void writeObject(Object streamObj) throws IOException
View Full Code Here

Examples of java.io.Externalizable.writeExternal()

    else if (obj instanceof Externalizable && (!Proxy.isProxyClass(cls)))
    {
      Externalizable extObj = (Externalizable)obj;
      try
      {
        extObj.writeExternal(new ObjectOutputAdaptor()
        {
          private int count = 0;

          @Override
          public void writeObject(Object streamObj) throws IOException
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.