Examples of writeBody()


Examples of com.opensymphony.module.sitemesh.HTMLPage.writeBody()

                if (node.jjtGetNumChildren() == 3)
                    context.put("title", (String) node.jjtGetChild(1).value(adapter));
                else
                    context.put("title", page.getTitle());
                StringWriter buffer = new StringWriter();
                page.writeBody(OutputConverter.getWriter(buffer));
                context.put("body", buffer.toString());
                buffer = new StringWriter();
                page.writeHead(OutputConverter.getWriter(buffer));
                context.put("head", buffer.toString());
                context.put("params", params);
View Full Code Here

Examples of com.opensymphony.module.sitemesh.HTMLPage.writeBody()

            head = "<!-- No head -->";
        } else {
            title = htmlPage.getTitle();

            StringWriter buffer = new StringWriter();
            htmlPage.writeBody(buffer);
            body = buffer.toString();

            buffer = new StringWriter();
            htmlPage.writeHead(buffer);
            head = buffer.toString();
View Full Code Here

Examples of com.opensymphony.module.sitemesh.HTMLPage.writeBody()

    else
    {
      title=htmlPage.getTitle();
     
      StringWriter buffer = new StringWriter();
      htmlPage.writeBody(buffer);
      body=buffer.toString();
     
      buffer = new StringWriter();
      htmlPage.writeHead(buffer);
      head=buffer.toString();
View Full Code Here

Examples of com.opensymphony.module.sitemesh.Page.writeBody()

        Writer writer = new NullWriter();
        long start = System.currentTimeMillis();
        for (int i = 0; i < times; i++)
        {
            Page page = parser.parse(new DefaultSitemeshBuffer(data));
            page.writeBody(writer);
        }
        long finish = System.currentTimeMillis();
        long time = finish - start;
        System.out.println(name + " total: " + time + "ms");
        System.out.println(name + " average: " + (double) time / (double) times + "ms");
View Full Code Here

Examples of net.sf.joafip.store.service.objectio.serialize.output.IObjectOutput.writeBody()

    // storageInfo.setHeaderDataSize(offset);
    final int byteSize = objectOutput
        .byteSize(objectAndPersistInfo, offset);
    final byte[] binary = new byte[byteSize];
    // write
    final ObjectClassInfoAndDeclared[] sons = objectOutput
        .writeBody(binary, offset, objectAndPersistInfo, true/* updateOriginalValue */);
    return new WriteResult(objectAndPersistInfo, sons, binary);
  }

  protected void assertSons(final Object toSerialize,
View Full Code Here

Examples of net.sf.joafip.store.service.objectio.serialize.output.IObjectOutput.writeBody()

    objectOutput.prepareWrite(objectAndItsClassInfo);
    final byte[] binary = new byte[1000];
    final int offset = storageInfo.getHeaderDataSize();
    storageInfo.setHeaderDataSize(offset);
    // int byte size to skip class name information
    objectOutput
        .writeBody(binary, offset/*
                     * bodyBeginOffset for class id
                     */, objectAndItsClassInfo, false/* updateOriginalValue */);
    // dummy data record identifier for object
    final DataRecordIdentifier dataRecordIdentifier = DataRecordIdentifier.LAST;
View Full Code Here

Examples of net.sf.joafip.store.service.objectio.serialize.output.IObjectOutput.writeBody()

    if (offset != HEADER_DATA_SIZE) {
      throw new ObjectIOException("header data size miss match");
    }

    /* then object serialization */
    objectOutput.writeBody(binary, offset, toWrite, false);

    try {
      changeFileOutputStream.write(binary, 0, binary.length);
    } catch (final IOException exception) {
      throw new ObjectIOException(exception);
View Full Code Here

Examples of net.sf.joafip.store.service.objectio.serialize.output.IObjectOutput.writeBody()

    final byte[] binary = new byte[byteSize];
    final int offset = headerWriter.write(classInfo, binary);
    if (offset != HEADER_DATA_SIZE) {
      throw new ObjectIOException("header data size missmatch");
    }
    final ObjectClassInfoAndDeclared[] sonObject = objectOutput.writeBody(
        binary, offset, toWriteObjectAndPersistInfo, true);

    writeDataRecord(dataRecordIdentifier, binary);

    if (logger.debugEnabled) {
View Full Code Here

Examples of net.sf.joafip.store.service.objectio.serialize.output.ObjectOutputForBasic.writeBody()

    objectOutput.prepareWrite(objectAndItsClassInfo);
    final byte[] binary = new byte[1000];
    final int offset = storageInfo.getHeaderDataSize();
    storageInfo.setHeaderDataSize(offset);
    // int byte size to skip class name information
    objectOutput
        .writeBody(binary, offset/*
                     * bodyBeginOffset for class id
                     */, objectAndItsClassInfo, false/* updateOriginalValue */);
    // dummy data record identifier for object
    final DataRecordIdentifier dataRecordIdentifier = DataRecordIdentifier.LAST;
View Full Code Here

Examples of net.sf.joafip.store.service.objectio.serialize.output.ObjectOutputSerializable.writeBody()

    // storageInfo.setHeaderDataSize(offset);
    final int byteSize = objectOutput
        .byteSize(objectAndPersistInfo, offset);
    final byte[] binary = new byte[byteSize];
    // write
    final ObjectClassInfoAndDeclared[] sons = objectOutput
        .writeBody(binary, offset, objectAndPersistInfo, true/* updateOriginalValue */);
    return new WriteResult(objectAndPersistInfo, sons, binary);
  }

  protected void assertSons(final Object toSerialize,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.