Package org.jboss.marshalling

Examples of org.jboss.marshalling.SimpleDataOutput


*/
public class SimpleByteDataOutput extends OutputStream implements ByteDataOutput {
    private final SimpleDataOutput output;

    public SimpleByteDataOutput(final OutputStream outputStream) {
        this.output = new SimpleDataOutput(Marshalling.createByteOutput(outputStream));
    }
View Full Code Here


        log.tracef("Storing state to %s", file);
        try {
            FileOutputStream outputStream = null;
            try {
                outputStream = FOSAction.open(file);
                SimpleDataOutput output = new SimpleDataOutput(Marshalling.createByteOutput(outputStream));
                int version = this.passivationManager.getCurrentMarshallingVersion();
                output.writeInt(version);
                MarshallingConfiguration config = this.passivationManager.getMarshallingConfiguration(version);
                Marshaller marshaller = this.marshallerFactory.createMarshaller(config);
                marshaller.start(output);
                try {
                    marshaller.writeObject(obj);
View Full Code Here

        if (bytes != null) return bytes;
        if (this.object == null) return null;
        int version = this.context.getCurrentVersion();
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        ClassLoader loader = setThreadContextClassLoader(this.context.getClassLoader());
        try (SimpleDataOutput data = new SimpleDataOutput(Marshalling.createByteOutput(output))) {
            data.writeInt(version);
            try (Marshaller marshaller = this.context.createMarshaller(version)) {
                marshaller.start(data);
                marshaller.writeObject(this.object);
                marshaller.finish();
                return output.toByteArray();
View Full Code Here

        log.tracef("Closing %s by sending bye bye", this);
        pinger.removeChannel(this);
        ManagementByeByeHeader byeByeHeader = new ManagementByeByeHeader(ManagementProtocol.VERSION);

        try {
            SimpleDataOutput out = new SimpleDataOutput(Marshalling.createByteOutput(writeMessage()));
            try {
                byeByeHeader.write(out);
            } catch (IOException ingore) {
            }finally {
                IoUtils.safeClose(out);
View Full Code Here

    }

    private void sendHeaderAndCloseOnError(ManagementProtocolHeader header) {
        boolean ok = false;
        try {
            SimpleDataOutput out = new SimpleDataOutput(Marshalling.createByteOutput(writeMessage()));
            try {
                header.write(out);
                ok = true;
            }finally {
                IoUtils.safeClose(out);
View Full Code Here

*/
public class SimpleByteDataOutput extends OutputStream implements ByteDataOutput {
    private final SimpleDataOutput output;

    public SimpleByteDataOutput(final OutputStream outputStream) {
        this.output = new SimpleDataOutput(Marshalling.createByteOutput(outputStream));
    }
View Full Code Here

        ROOT_LOGGER.tracef("Closing %s by sending bye bye", this);
        pinger.removeChannel(this);
        ManagementByeByeHeader byeByeHeader = new ManagementByeByeHeader(ManagementProtocol.VERSION);

        try {
            SimpleDataOutput out = new SimpleDataOutput(Marshalling.createByteOutput(writeMessage()));
            try {
                byeByeHeader.write(out);
            } catch (IOException ingore) {
            }finally {
                IoUtils.safeClose(out);
View Full Code Here

    }

    private void sendHeaderAndCloseOnError(ManagementProtocolHeader header) {
        boolean ok = false;
        try {
            SimpleDataOutput out = new SimpleDataOutput(Marshalling.createByteOutput(writeMessage()));
            try {
                header.write(out);
                ok = true;
            }finally {
                IoUtils.safeClose(out);
View Full Code Here

        log.tracef("Storing state to %s", file);
        try {
            FileOutputStream outputStream = null;
            try {
                outputStream = FOSAction.open(file);
                SimpleDataOutput output = new SimpleDataOutput(Marshalling.createByteOutput(outputStream));
                int version = this.passivationManager.getCurrentMarshallingVersion();
                output.writeInt(version);
                MarshallingConfiguration config = this.passivationManager.getMarshallingConfiguration(version);
                Marshaller marshaller = this.marshallerFactory.createMarshaller(config);
                marshaller.start(output);
                try {
                    marshaller.writeObject(obj);
View Full Code Here

        byte[] bytes = this.bytes;
        if (bytes != null) return bytes;
        if (this.object == null) return null;
        int version = this.context.getCurrentVersion();
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        SimpleDataOutput data = new SimpleDataOutput(Marshalling.createByteOutput(output));
        data.writeInt(version);
        Marshaller marshaller = this.context.createMarshaller(version);
        try {
            marshaller.start(data);

            // Workaround for AS7-2496
View Full Code Here

TOP

Related Classes of org.jboss.marshalling.SimpleDataOutput

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.