| Class | Line # | Actions | |||||
|---|---|---|---|---|---|---|---|
| BlockDumper | 35 | 0 | - | 0 | 0 |
| 1 | /* | |
| 2 | * See the NOTICE file distributed with this work for additional | |
| 3 | * information regarding copyright ownership. | |
| 4 | * | |
| 5 | * This is free software; you can redistribute it and/or modify it | |
| 6 | * under the terms of the GNU Lesser General Public License as | |
| 7 | * published by the Free Software Foundation; either version 2.1 of | |
| 8 | * the License, or (at your option) any later version. | |
| 9 | * | |
| 10 | * This software is distributed in the hope that it will be useful, | |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 13 | * Lesser General Public License for more details. | |
| 14 | * | |
| 15 | * You should have received a copy of the GNU Lesser General Public | |
| 16 | * License along with this software; if not, write to the Free | |
| 17 | * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | |
| 18 | * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | |
| 19 | */ | |
| 20 | package org.xwiki.rendering.signature.internal; | |
| 21 | ||
| 22 | import java.io.IOException; | |
| 23 | import java.io.OutputStream; | |
| 24 | ||
| 25 | import org.xwiki.component.annotation.Role; | |
| 26 | import org.xwiki.rendering.block.Block; | |
| 27 | ||
| 28 | /** | |
| 29 | * Dump a {@link Block} into a binary stream. | |
| 30 | * | |
| 31 | * @version $Id: 352b9c8e612d7166c441352375c96f0cc97ce093 $ | |
| 32 | * @since 6.1M2 | |
| 33 | */ | |
| 34 | @Role | |
| 35 | public interface BlockDumper | |
| 36 | { | |
| 37 | /** | |
| 38 | * Dump a {@link org.xwiki.rendering.block.MacroBlock} or a {@link org.xwiki.rendering.block.MacroMarkerBlock} into | |
| 39 | * a binary stream. | |
| 40 | * | |
| 41 | * @param out the stream to be written. | |
| 42 | * @param block the {@link org.xwiki.rendering.block.MacroBlock} | |
| 43 | * or {@link org.xwiki.rendering.block.MacroMarkerBlock} to dump. | |
| 44 | * @throws IOException on error. | |
| 45 | */ | |
| 46 | void dump(OutputStream out, Block block) throws IOException; | |
| 47 | ||
| 48 | /** | |
| 49 | * Dump a {@link org.xwiki.rendering.block.MacroBlock} or a {@link org.xwiki.rendering.block.MacroMarkerBlock} into | |
| 50 | * a byte array. | |
| 51 | * | |
| 52 | * @param block the {@link org.xwiki.rendering.block.MacroBlock} | |
| 53 | * or {@link org.xwiki.rendering.block.MacroMarkerBlock} to dump. | |
| 54 | * @return the resulting byte array. | |
| 55 | * @throws IOException on error. | |
| 56 | */ | |
| 57 | byte[] dump(Block block) throws IOException; | |
| 58 | } |