You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2013/05/29 12:04:32 UTC
svn commit: r1487428 - in /sis/branches/JDK7/storage/sis-storage: pom.xml
src/main/java/org/apache/sis/internal/storage/ChannelImageInputStream.java
Author: desruisseaux
Date: Wed May 29 10:04:32 2013
New Revision: 1487428
URL: http://svn.apache.org/r1487428
Log:
Minor documentation updates.
Modified:
sis/branches/JDK7/storage/sis-storage/pom.xml
sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelImageInputStream.java
Modified: sis/branches/JDK7/storage/sis-storage/pom.xml
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-storage/pom.xml?rev=1487428&r1=1487427&r2=1487428&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-storage/pom.xml (original)
+++ sis/branches/JDK7/storage/sis-storage/pom.xml Wed May 29 10:04:32 2013
@@ -42,7 +42,7 @@
<description>
<!-- Left alignment because this description will be copied in META-INF/MANIFEST.MF
The leading space after the first line is necessary for proper formatting. -->
-DataStore API and base storage classes.
+Provides the interfaces and base classes to be implemented by various storage formats.
</description>
Modified: sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelImageInputStream.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelImageInputStream.java?rev=1487428&r1=1487427&r2=1487428&view=diff
==============================================================================
--- sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelImageInputStream.java [UTF-8] (original)
+++ sis/branches/JDK7/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/ChannelImageInputStream.java [UTF-8] Wed May 29 10:04:32 2013
@@ -458,6 +458,9 @@ loop: while ((c = read()) >= 0) {
* Attempting to {@linkplain #seek(long) seek} to an offset within the flushed
* portion of the stream will result in an {@link IndexOutOfBoundsException}.
*
+ * <p>This method moves the data starting at the given position to the beginning of the {@link #buffer},
+ * thus making more room for new data before the data at the given position is discarded.</p>
+ *
* @param position The length of the stream prefix that may be flushed.
* @throws IOException If an I/O error occurred.
*/
@@ -478,24 +481,25 @@ loop: while ((c = read()) >= 0) {
}
/**
- * Returns {@code true} if this {@code ImageInputStream} caches data itself in order to
- * allow {@linkplain #seek(long) seeking} backwards.
- *
- * @return {@code true} If this {@code ImageInputStream} caches data.
+ * Synonymous of {@link #isCachedMemory()} since the caching behavior of this class is uniquely determined
+ * by the policy that we choose for {@code isCachedMemory()}. This class never creates temporary files.
*
* @see #isCachedMemory()
* @see #isCachedFile()
*/
@Override
public final boolean isCached() {
- return false;
+ return isCachedMemory();
}
/**
- * Returns {@code true} if this {@code ImageInputStream} caches data itself in order to
- * allow {@linkplain #seek(long) seeking} backwards, and the cache is kept in main memory.
+ * Returns {@code false} since this {@code ImageInputStream} does not cache data itself in order to
+ * allow {@linkplain #seek(long) seeking} backwards. Actually, we could consider the {@link #buffer}
+ * as a cache in main memory. But this buffer has a maximal capacity, which would be a violation of
+ * {@code ImageInputStream} contract.
*
- * @return {@code true} if this {@code ImageInputStream} caches data in main memory.
+ * @return {@code false} since this {@code ImageInputStream} does not caches data in main memory
+ * (ignoring the {@link #buffer}).
*/
@Override
public final boolean isCachedMemory() {
@@ -503,10 +507,9 @@ loop: while ((c = read()) >= 0) {
}
/**
- * Returns {@code true} if this {@code ImageInputStream} caches data itself in order to allow
- * {@linkplain #seek(long) seeking} backwards, and the cache is kept in a temporary file.
+ * Returns {@code false} since this {@code ImageInputStream} does not cache data in a temporary file.
*
- * @return {@code true} if this {@code ImageInputStream} caches data in a temporary file.
+ * @return {@code false} since this {@code ImageInputStream} does not cache data in a temporary file.
*/
@Override
public final boolean isCachedFile() {