Package com.threerings.io

Examples of com.threerings.io.ObjectOutputStream


        public TourneyRecord (TourneyConfig tourneyConfig)
        {
            this(tourneyConfig.tourneyId);
            ByteArrayOutputStream bstream = new ByteArrayOutputStream();
            ObjectOutputStream ostream = new ObjectOutputStream(bstream);

            try {
                ostream.writeObject(config);
                config = bstream.toByteArray();

            } catch (IOException e) {
                log.warning("Error writing TourneyConfig to byte array [e=" + e + "].");
            }
View Full Code Here


     */
    protected boolean updateStat (int playerId, final Stat stat, boolean forceWrite)
    {
        ByteArrayOutInputStream out = new ByteArrayOutInputStream();
        try {
            stat.persistTo(new ObjectOutputStream(out), this);
        } catch (IOException ioe) {
            throw new DatabaseException("Error serializing stat " + stat, ioe);
        }

        byte[] data = out.toByteArray();
View Full Code Here

    public byte[] persistUpdate (SceneUpdate update)
        throws PersistenceException
    {
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        try {
            update.persistTo(new ObjectOutputStream(out));
        } catch (IOException ioe) {
            throw new PersistenceException("Error serializing update " + update, ioe);
        }
        return out.toByteArray();
    }
View Full Code Here

TOP

Related Classes of com.threerings.io.ObjectOutputStream

Copyright © 2018 www.massapicom. 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.