Java OutputStream Write serializeNull(DataOutputStream dout)

Here you can find the source of serializeNull(DataOutputStream dout)

Description

serialize Null

License

Open Source License

Declaration

private static void serializeNull(DataOutputStream dout) throws IOException 

Method Source Code


//package com.java2s;
import java.io.*;

public class Main {
    private static String tagNull = "Null";

    private static void serializeNull(DataOutputStream dout) throws IOException {
        serializeHeaderString(tagNull, dout);
        serializeTrailerString(tagNull, dout);
    }// ww  w  .  java  2  s.c  o  m

    private static void serializeHeaderString(String str, DataOutputStream dout) throws IOException {
        dout.writeUTF("[" + str);
    }

    private static void serializeTrailerString(String str, DataOutputStream dout) throws IOException {
        // dout.writeUTF( str + "]" );
        dout.writeUTF("]");
    }
}

Related

  1. serialize(Serializable obj, OutputStream outputStream)
  2. serialize(Serializable obj, OutputStream outputStream)
  3. serialize(Serializable s, OutputStream os)
  4. serializeInt(int i, DataOutputStream dout)
  5. serializeInt(OutputStream out, Integer data)
  6. serializeObject(OutputStream out, Object o)
  7. serializeShortLE(short value, OutputStream outStream)
  8. serializeSpecial(OutputStream os, Serializable obj)
  9. serializeString(OutputStream out, String data)