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

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

Description

write String

License

LGPL

Declaration

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

Method Source Code

//package com.java2s;

import java.io.DataOutputStream;

import java.io.IOException;

public class Main {
    public static void writeString(String s, DataOutputStream out) throws IOException {
        if (s != null) {
            out.write(1);/*from  www  . j  av  a 2s.  c  o m*/
            out.writeUTF(s);
        } else {
            out.write(0);
        }
    }
}

Related

  1. writeString(DataOutputStream outputStream, String string)
  2. writeString(final DataOutputStream out, final String str)
  3. writeString(final DataOutputStream out, final String value)
  4. writeString(String arg, DataOutputStream data)
  5. writeString(String s, DataOutputStream out)
  6. writeString(String s, DataOutputStream writer)
  7. writeString(String str, DataOutputStream dos)
  8. writeString(String str, DataOutputStream os)
  9. writeString(String stringToWrite, DataOutputStream data)