Package com.adobe.xmp.core.serializer
Class SerializeOptions
- java.lang.Object
-
- com.adobe.xmp.core.serializer.SerializeOptions
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SerializeOptions extends java.lang.Object implements java.lang.Cloneable
Options forXMPSerializer
. Default serialization tooks place if no options are set.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SerializeOptions.Option
Enum for all serialization options.
-
Constructor Summary
Constructors Constructor Description SerializeOptions(SerializeOptions.Option... options)
Creates an options instance with one or more options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(SerializeOptions.Option option)
Adds an option flag.java.lang.Object
clone()
int
getBaseIndent()
java.lang.String
getEncoding()
java.lang.String
getIndent()
java.lang.String
getNewline()
java.util.EnumSet<SerializeOptions.Option>
getOptions()
int
getPadding()
boolean
hasOption(SerializeOptions.Option option)
Check if an options is set.void
remove(SerializeOptions.Option option)
Removes an option flag.void
setBaseIndent(int baseIndent)
void
setIndent(java.lang.String indent)
void
setNewline(java.lang.String newline)
void
setOptions(java.util.EnumSet<SerializeOptions.Option> options)
void
setPadding(int padding)
-
-
-
Constructor Detail
-
SerializeOptions
public SerializeOptions(SerializeOptions.Option... options)
Creates an options instance with one or more options.- Parameters:
options
- a list of option parameters
-
-
Method Detail
-
hasOption
public boolean hasOption(SerializeOptions.Option option)
Check if an options is set.- Parameters:
option
- the option flag- Returns:
- Returns true if the option is set, false otherwise.
-
add
public void add(SerializeOptions.Option option)
Adds an option flag.- Parameters:
option
- an option enum
-
remove
public void remove(SerializeOptions.Option option)
Removes an option flag.- Parameters:
option
- an option enum
-
getOptions
public java.util.EnumSet<SerializeOptions.Option> getOptions()
- Returns:
- the options
-
setOptions
public void setOptions(java.util.EnumSet<SerializeOptions.Option> options)
- Parameters:
options
- the options to set
-
getPadding
public int getPadding()
- Returns:
- the padding
-
setPadding
public void setPadding(int padding)
- Parameters:
padding
- the padding to set
-
getNewline
public java.lang.String getNewline()
- Returns:
- the newline
-
setNewline
public void setNewline(java.lang.String newline)
- Parameters:
newline
- the newline to set
-
getIndent
public java.lang.String getIndent()
- Returns:
- the indent
-
setIndent
public void setIndent(java.lang.String indent)
- Parameters:
indent
- the indent to set
-
getBaseIndent
public int getBaseIndent()
- Returns:
- the baseIndent
-
setBaseIndent
public void setBaseIndent(int baseIndent)
- Parameters:
baseIndent
- the baseIndent to set
-
getEncoding
public java.lang.String getEncoding()
- Returns:
- Returns the encoding as Java encoding String.
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
- Returns:
- Returns clone of this SerializeOptions-object with the same options set.
- Throws:
java.lang.CloneNotSupportedException
- Cannot happen in this place.
-
-