13
|
1 /*******************************************************************************
|
|
2 * Copyright (c) 2000, 2003 IBM Corporation and others.
|
|
3 * All rights reserved. This program and the accompanying materials
|
|
4 * are made available under the terms of the Eclipse Public License v1.0
|
|
5 * which accompanies this distribution, and is available at
|
|
6 * http://www.eclipse.org/legal/epl-v10.html
|
|
7 *
|
|
8 * Contributors:
|
|
9 * IBM Corporation - initial API and implementation
|
|
10 *******************************************************************************/
|
|
11 module dwt.internal.image.JPEGRestartInterval;
|
|
12
|
|
13 import dwt.internal.image.JPEGFixedSizeSegment;
|
|
14 import dwt.internal.image.LEDataInputStream;
|
|
15 import dwt.internal.image.JPEGFileFormat;
|
|
16
|
|
17 final class JPEGRestartInterval : JPEGFixedSizeSegment {
|
|
18
|
|
19 public this(LEDataInputStream byteStream) {
|
|
20 super(byteStream);
|
|
21 }
|
|
22
|
|
23 public int signature() {
|
|
24 return JPEGFileFormat.DRI;
|
|
25 }
|
|
26
|
|
27 public int getRestartInterval() {
|
|
28 return ((reference[4] & 0xFF) << 8 | (reference[5] & 0xFF));
|
|
29 }
|
|
30
|
|
31 public int fixedSize() {
|
|
32 return 6;
|
|
33 }
|
|
34 }
|