View Javadoc
1   /*******************************************************************************
2    * Copyright (c) 2015 VoyagerSearch
3    * All rights reserved. This program and the accompanying materials
4    * are made available under the terms of the Apache License, Version 2.0 which
5    * accompanies this distribution and is available at
6    *    http://www.apache.org/licenses/LICENSE-2.0.txt
7    ******************************************************************************/
8   
9   package org.locationtech.spatial4j.io;
10  
11  import java.io.IOException;
12  import java.io.Writer;
13  import org.locationtech.spatial4j.shape.Shape;
14  
15  /**
16   * Implementations are expected to be thread safe
17   */
18  public interface ShapeWriter extends ShapeIO {
19  
20    /**
21     * Write a shape to the output writer
22     */
23    public void write(Writer output, Shape shape) throws IOException;
24  
25    /**
26     * Write a shape to String
27     */
28    public String toString(Shape shape);
29  }