/** * Releases the namespaces map. */ @Override public void release() { if (this.namespaces != null) { this.namespaces.clear(); this.namespaces = null; } super.release(); }
/** * Constructor. * * @param mediaType * The representation's mediaType. * @param expectedSize * The expected writer size in bytes. */ public WriterRepresentation(MediaType mediaType, long expectedSize) { super(mediaType); setSize(expectedSize); }
@Override public long getSize() { if (this.jsonRepresentation != null) { return this.jsonRepresentation.getSize(); } return super.getSize(); }
public void run() { try { representation.write(pipedWriter); pipedWriter.flush(); } catch (IOException ioe) { Context.getCurrentLogger().log(Level.WARNING, "Error while writing to the piped reader.", ioe); } finally { try { pipedWriter.close(); } catch (IOException ioe2) { Context.getCurrentLogger().log(Level.WARNING, "Error while closing the pipe.", ioe2); } } } };
representation.setCharacterSet( CharacterSet.UTF_8 );
@Override public long getSize() { if (this.jsonRepresentation != null) { return this.jsonRepresentation.getSize(); } return super.getSize(); }
@Override public long getSize() { if (this.jsonRepresentation != null) { return this.jsonRepresentation.getSize(); } return super.getSize(); }
/** * Releases the namespaces map. */ @Override public void release() { if (this.namespaces != null) { this.namespaces.clear(); this.namespaces = null; } super.release(); }
/** * Constructor. * * @param mediaType * The representation's mediaType. * @param expectedSize * The expected writer size in bytes. */ public WriterRepresentation(MediaType mediaType, long expectedSize) { super(mediaType); setSize(expectedSize); }
/** * Releases the source and transform sheet representations, the transformer * and the URI resolver. */ @Override public void release() { if (this.sourceRepresentation != null) { this.sourceRepresentation.release(); this.sourceRepresentation = null; } if (this.templates != null) { this.templates = null; } if (this.transformSheet != null) { this.transformSheet.release(); this.transformSheet = null; } if (this.uriResolver != null) { this.uriResolver = null; } super.release(); }