Revision 8696 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster/org.gvsig.raster.lib/org.gvsig.raster.lib.buffer/org.gvsig.raster.lib.buffer.impl/src/main/java/org/gvsig/raster/lib/buffer/impl/AbstractBuffer.java

View differences:

AbstractBuffer.java
207 207
    @Override
208 208
    public BandByte getBandByte(int pos) {
209 209
        if (this.bands.get(pos).getDataType() != BufferManager.TYPE_BYTE) {
210
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s", pos, this.bands
210
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s, byte expected", pos, this.bands
211 211
                .get(pos).getDataType()));
212 212
        }
213 213
        return (BandByte) this.bands.get(pos);
......
216 216
    @Override
217 217
    public BandShort getBandShort(int pos) {
218 218
        if (this.bands.get(pos).getDataType() != BufferManager.TYPE_SHORT) {
219
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s", pos, this.bands
219
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s, short expected", pos, this.bands
220 220
                .get(pos).getDataType()));
221 221
        }
222 222
        return (BandShort) this.bands.get(pos);
......
225 225
    @Override
226 226
    public BandInt getBandInt(int pos) {
227 227
        if (this.bands.get(pos).getDataType() != BufferManager.TYPE_INT) {
228
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s", pos, this.bands
228
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s, int expected", pos, this.bands
229 229
                .get(pos).getDataType()));
230 230
        }
231 231
        return (BandInt) this.bands.get(pos);
......
235 235
    @Override
236 236
    public BandFloat getBandFloat(int pos) {
237 237
        if (this.bands.get(pos).getDataType() != BufferManager.TYPE_FLOAT) {
238
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s", pos, this.bands
238
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s, float expected", pos, this.bands
239 239
                .get(pos).getDataType()));
240 240
        }
241 241
        return (BandFloat) this.bands.get(pos);
......
245 245
    @Override
246 246
    public BandDouble getBandDouble(int pos) {
247 247
        if (this.bands.get(pos).getDataType() != BufferManager.TYPE_DOUBLE) {
248
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s", pos, this.bands
248
            throw new IllegalArgumentException(String.format("Band in position %1s is type of %2s, double expected", pos, this.bands
249 249
                .get(pos).getDataType()));
250 250
        }
251 251
        return (BandDouble) this.bands.get(pos);

Also available in: Unified diff