Package java.io

Examples of java.io.DataOutputStream.writeUTF()


  public byte[] serialize() throws IOException {
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    DataOutputStream dos = new DataOutputStream(bos);
    dos.writeUTF(type.toString());
    dos.writeUTF(arg1);
    dos.writeUTF(arg2);
    return bos.toByteArray();
  }
}
View Full Code Here


    DataOutputStream output=new DataOutputStream(new FileOutputStream(file, true));
   
    output.writeInt(mailToImprove.size());
    for(Entry<String,PidStats> e:mailToImprove.entrySet())
    {
      output.writeUTF(e.getKey());
      output.writeInt(e.getValue().pidStatMap.size());
      for(Entry<String, ArrayList<PidStat>>  ee:e.getValue().pidStatMap.entrySet())
      {
        output.writeUTF(ee.getKey());
        ArrayList<PidStat> v=ee.getValue();
View Full Code Here

    {
      output.writeUTF(e.getKey());
      output.writeInt(e.getValue().pidStatMap.size());
      for(Entry<String, ArrayList<PidStat>>  ee:e.getValue().pidStatMap.entrySet())
      {
        output.writeUTF(ee.getKey());
        ArrayList<PidStat> v=ee.getValue();
        output.writeInt(v.size());
        for(PidStat s:v)
        {
          PidStat.write(output, s);
View Full Code Here

    DataOutputStream output=new DataOutputStream(new FileOutputStream(file, true));
   
    output.writeInt(mailToImprove.size());
    for(Entry<String,PidStats> e:mailToImprove.entrySet())
    {
      output.writeUTF(e.getKey());
      output.writeInt(e.getValue().pidStatMap.size());
      for(Entry<String, ArrayList<PidStat>>  ee:e.getValue().pidStatMap.entrySet())
      {
        output.writeUTF(ee.getKey());
        ArrayList<PidStat> v=ee.getValue();
View Full Code Here

    {
      output.writeUTF(e.getKey());
      output.writeInt(e.getValue().pidStatMap.size());
      for(Entry<String, ArrayList<PidStat>>  ee:e.getValue().pidStatMap.entrySet())
      {
        output.writeUTF(ee.getKey());
        ArrayList<PidStat> v=ee.getValue();
        output.writeInt(v.size());
        for(PidStat s:v)
        {
          PidStat.write(output, s);
View Full Code Here

    DataOutputStream output=new DataOutputStream(new FileOutputStream(file, true));
   
    output.writeInt(mailToImprove.size());
    for(Entry<String,PidStats> e:mailToImprove.entrySet())
    {
      output.writeUTF(e.getKey());
      output.writeInt(e.getValue().pidStatMap.size());
      for(Entry<String, ArrayList<PidStat>>  ee:e.getValue().pidStatMap.entrySet())
      {
        output.writeUTF(ee.getKey());
        ArrayList<PidStat> v=ee.getValue();
View Full Code Here

    {
      output.writeUTF(e.getKey());
      output.writeInt(e.getValue().pidStatMap.size());
      for(Entry<String, ArrayList<PidStat>>  ee:e.getValue().pidStatMap.entrySet())
      {
        output.writeUTF(ee.getKey());
        ArrayList<PidStat> v=ee.getValue();
        output.writeInt(v.size());
        for(PidStat s:v)
        {
          PidStat.write(output, s);
View Full Code Here

     * useful to do so. */
    private byte[] encodeAndChecksumOriginalDetails(FreenetURI thisKey, FreenetURI origKey,
            byte[] clientDetails, boolean isFinalFetch) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream dos = new DataOutputStream(baos);
        dos.writeUTF(thisKey.toASCIIString());
        dos.writeUTF(origKey.toASCIIString());
        dos.writeBoolean(isFinalFetch);
        dos.writeInt(clientDetails.length);
        dos.write(clientDetails);
        dos.writeInt(maxRetries);
View Full Code Here

    private byte[] encodeAndChecksumOriginalDetails(FreenetURI thisKey, FreenetURI origKey,
            byte[] clientDetails, boolean isFinalFetch) throws IOException {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        DataOutputStream dos = new DataOutputStream(baos);
        dos.writeUTF(thisKey.toASCIIString());
        dos.writeUTF(origKey.toASCIIString());
        dos.writeBoolean(isFinalFetch);
        dos.writeInt(clientDetails.length);
        dos.write(clientDetails);
        dos.writeInt(maxRetries);
        dos.writeInt(cooldownTries);
View Full Code Here

        while (e.hasMoreElements())
        {
            StoreEntry  entry = (StoreEntry)e.nextElement();

            dOut.write(entry.getType());
            dOut.writeUTF(entry.getAlias());
            dOut.writeLong(entry.getDate().getTime());

            Certificate[]   chain = entry.getCertificateChain();
            if (chain == null)
            {
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.