org.jboss.dna.graph.property.basic
Class InMemoryBinaryValueFactory

java.lang.Object
  extended by org.jboss.dna.graph.property.basic.AbstractValueFactory<Binary>
      extended by org.jboss.dna.graph.property.basic.AbstractBinaryValueFactory
          extended by org.jboss.dna.graph.property.basic.InMemoryBinaryValueFactory
All Implemented Interfaces:
BinaryFactory, ValueFactory<Binary>

@Immutable
public class InMemoryBinaryValueFactory
extends AbstractBinaryValueFactory

The ValueFactory for in-memory PropertyType.BINARY values.

This factory does not reuse any instances.


Field Summary
 
Fields inherited from interface org.jboss.dna.graph.property.ValueFactory
DEFAULT_DECODER, DEFAULT_ENCODER
 
Constructor Summary
InMemoryBinaryValueFactory(TextDecoder decoder, ValueFactory<String> stringValueFactory)
           
 
Method Summary
 Binary create(byte[] value)
          Create a value from the binary content given by the supplied array.
 
Methods inherited from class org.jboss.dna.graph.property.basic.AbstractBinaryValueFactory
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, find
 
Methods inherited from class org.jboss.dna.graph.property.basic.AbstractValueFactory
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getDecoder, getPropertyType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.dna.graph.property.ValueFactory
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getPropertyType
 

Constructor Detail

InMemoryBinaryValueFactory

public InMemoryBinaryValueFactory(TextDecoder decoder,
                                  ValueFactory<String> stringValueFactory)
Method Detail

create

public Binary create(byte[] value)
Create a value from the binary content given by the supplied array.

Parameters:
value - the content to be used to create the value
Returns:
the value, or null if the supplied stream is null


Copyright © 2008-2009 JBoss, a division of Red Hat. All Rights Reserved.