Java DataOutputStream Write String writeString(DataOutputStream out, String str)

Here you can find the source of writeString(DataOutputStream out, String str)

Description

write String

License

Open Source License

Declaration

public static void writeString(DataOutputStream out, String str) throws IOException 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.io.DataOutputStream;

import java.io.IOException;

public class Main {
    public static void writeString(DataOutputStream out, String str) throws IOException {
        byte[] b = str.getBytes();
        out.writeInt(b.length);/* w w w .  j  a va  2 s  .  c  om*/
        out.write(b);
    }
}

Related

  1. writeString(DataOutputStream buf, String value)
  2. writeString(DataOutputStream os, String s)
  3. writeString(DataOutputStream os, String str)
  4. writeString(DataOutputStream out, String s)
  5. writeString(DataOutputStream out, String str)
  6. writeString(DataOutputStream out, String str)
  7. writeString(DataOutputStream out, String text)
  8. writeString(DataOutputStream out, String theString)
  9. writeString(DataOutputStream out, String val)