forked from grails/grails-core
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor EncodedWriter from StreamCharBuffer to grails-core as Encode…
…dAppender
- Loading branch information
Showing
6 changed files
with
81 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
grails-core/src/main/groovy/org/codehaus/groovy/grails/support/encoding/EncodedAppender.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package org.codehaus.groovy.grails.support.encoding; | ||
|
||
import java.io.IOException; | ||
import java.util.Set; | ||
|
||
public interface EncodedAppender { | ||
public void append(Encoder encoder, Set<Encoder> currentEncoders, String str, int off, int len) throws IOException ; | ||
public void append(Encoder encoder, Set<Encoder> currentEncoders, char[] b, int off, int len) throws IOException ; | ||
public void append(Encoder encoder, StreamEncodeable streamEncodeable) throws IOException ; | ||
} |
7 changes: 7 additions & 0 deletions
7
...ls-core/src/main/groovy/org/codehaus/groovy/grails/support/encoding/StreamEncodeable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package org.codehaus.groovy.grails.support.encoding; | ||
|
||
import java.io.IOException; | ||
|
||
public interface StreamEncodeable { | ||
public void encodeTo(EncodedAppender appender, Encoder encoder) throws IOException; | ||
} |
4 changes: 1 addition & 3 deletions
4
...ls-core/src/main/groovy/org/codehaus/groovy/grails/support/encoding/StreamingEncoder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
package org.codehaus.groovy.grails.support.encoding; | ||
|
||
import java.io.IOException; | ||
import java.io.Writer; | ||
|
||
public interface StreamingEncoder extends Encoder { | ||
public void encodeToWriter(Object source, Writer writer) throws IOException; | ||
public void encodeToStream(Object source, EncodedAppender appender); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters