/* * @(#)FileIOTest.java 0.1 1999/09/10 * * Copyright 1999 by Yoon Kyung Koo. * All rights reserved. * * This software is the confidential and proprietary information * of Yoon Kyung Koo. ("Confidential Information"). You * shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement * you entered into with Yoon Kyung Koo. * */ /** * This class provides a test over * communication with C/C++ apps * * @version 0.1 1999/09/10 * @author Yoon Kyung Koo * @see java.io.Test * @see java.io.ObjectInputStream * @see java.io.ObjectOutputStream */ import java.io.*; /** * This class is a sample data class * * NOTE that object stream cannot be used for communicating with C/C++ apps. * java uses its proprietary format to represent objects. * * Corresponding C data structure will be somewhat like this * struct { * char bytes[100]; * char c; // this will be problem... this will accompany non-used three bytes * bool val; // bool type is defined as int * int str_length; // length of string * char * string; // string bytes * } ; * */ class TestData { byte[] bytes = new byte[100] ; char c; // assume this char value will not excced one byte (i.e. cannot use Hangul char) boolean val; String string; /* * fill with some data */ public TestData() { for (int i=0; i